diff --git a/MANIFEST.in b/MANIFEST.in index c9c43e338705754dc980c6501eadc3875c17307b..dca383e3ada6733f43641ee86c39cb106184b0d8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,7 +10,6 @@ include testmime.py include testutils.py include test.py include sample.py -include sgmllib.py include milter-template.py include test/* include Milter/*.py diff --git a/miltermodule.c b/miltermodule.c index e3d0927f7bc0b3fe3c3c6b31cb7a85a23606bf95..76ab4ee64d56f05b095cac12057ac533b46ea76d 100644 --- a/miltermodule.c +++ b/miltermodule.c @@ -134,8 +134,10 @@ static struct MilterCallback { #if PY_MAJOR_VERSION >= 3 static struct smfiDesc description; /* forward declaration */ + static PyTypeObject milter_ContextType; #else staticforward struct smfiDesc description; /* forward declaration */ + staticforward PyTypeObject milter_ContextType; #endif static PyObject *MilterError; @@ -148,12 +150,6 @@ typedef struct { static milter_Diag diag; -#if PY_MAJOR_VERSION >= 3 - static PyTypeObject milter_ContextType; -#else - staticforward PyTypeObject milter_ContextType; -#endif - typedef struct { PyObject_HEAD SMFICTX *ctx; /* libmilter thread state */ @@ -772,13 +768,6 @@ milter_wrap_negotiate(SMFICTX *ctx, rc = _generic_wrapper(c, negotiate_callback, arglist); c->t = t; if (rc == SMFIS_CONTINUE) { -#if 0 // PyArgs_Parse deprecated and going away - if (!PyArgs_Parse(optlist,"[kkkk]",pf0,pf1,pf2,pf3)) { - PyErr_Print(); - PyErr_Clear(); /* must clear since not returning to python */ - rc = SMFIS_REJECT; - } -#else unsigned long *pa[4] = { pf0,pf1,pf2,pf3 }; unsigned long fa[4] = { f0,f1,f2,f3 }; int len = PyList_Size(optlist); @@ -797,7 +786,6 @@ milter_wrap_negotiate(SMFICTX *ctx, PyErr_Clear(); rc = SMFIS_REJECT; } -#endif } else if (rc != SMFIS_ALL_OPTS) rc = SMFIS_REJECT;