]> granicus.if.org Git - python/commitdiff
Patch #477750: Use METH_ constants in Modules.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 17 Jan 2002 23:15:58 +0000 (23:15 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 17 Jan 2002 23:15:58 +0000 (23:15 +0000)
27 files changed:
Modules/_codecsmodule.c
Modules/_tkinter.c
Modules/audioop.c
Modules/bsddbmodule.c
Modules/cdmodule.c
Modules/clmodule.c
Modules/dlmodule.c
Modules/flmodule.c
Modules/fmmodule.c
Modules/fpectlmodule.c
Modules/fpetestmodule.c
Modules/imageop.c
Modules/imgfile.c
Modules/mmapmodule.c
Modules/mpzmodule.c
Modules/nismodule.c
Modules/pcremodule.c
Modules/puremodule.c
Modules/regexmodule.c
Modules/resource.c
Modules/rgbimgmodule.c
Modules/rotormodule.c
Modules/sgimodule.c
Modules/socketmodule.c
Modules/sunaudiodev.c
Modules/svmodule.c
Modules/timingmodule.c

index 29b068687c770142bd3a97d943d71b7636dbb234..0c49f7f20fcff1f3494ef31b064898bcb0f30100 100644 (file)
@@ -667,37 +667,37 @@ mbcs_encode(PyObject *self,
 /* --- Module API --------------------------------------------------------- */
 
 static PyMethodDef _codecs_functions[] = {
-    {"register",               codecregister,                  1},
-    {"lookup",                 codeclookup,                    1},
+    {"register",               codecregister,                  METH_VARARGS},
+    {"lookup",                 codeclookup,                    METH_VARARGS},
 #ifdef Py_USING_UNICODE
-    {"utf_8_encode",           utf_8_encode,                   1},
-    {"utf_8_decode",           utf_8_decode,                   1},
-    {"utf_7_encode",           utf_7_encode,                   1},
-    {"utf_7_decode",           utf_7_decode,                   1},
-    {"utf_16_encode",          utf_16_encode,                  1},
-    {"utf_16_le_encode",       utf_16_le_encode,               1},
-    {"utf_16_be_encode",       utf_16_be_encode,               1},
-    {"utf_16_decode",          utf_16_decode,                  1},
-    {"utf_16_le_decode",       utf_16_le_decode,               1},
-    {"utf_16_be_decode",       utf_16_be_decode,               1},
-    {"utf_16_ex_decode",       utf_16_ex_decode,               1},
-    {"unicode_escape_encode",  unicode_escape_encode,          1},
-    {"unicode_escape_decode",  unicode_escape_decode,          1},
-    {"unicode_internal_encode",        unicode_internal_encode,        1},
-    {"unicode_internal_decode",        unicode_internal_decode,        1},
-    {"raw_unicode_escape_encode", raw_unicode_escape_encode,   1},
-    {"raw_unicode_escape_decode", raw_unicode_escape_decode,   1},
-    {"latin_1_encode",                 latin_1_encode,                 1},
-    {"latin_1_decode",                 latin_1_decode,                 1},
-    {"ascii_encode",           ascii_encode,                   1},
-    {"ascii_decode",           ascii_decode,                   1},
-    {"charmap_encode",                 charmap_encode,                 1},
-    {"charmap_decode",                 charmap_decode,                 1},
-    {"readbuffer_encode",      readbuffer_encode,              1},
-    {"charbuffer_encode",      charbuffer_encode,              1},
+    {"utf_8_encode",           utf_8_encode,                   METH_VARARGS},
+    {"utf_8_decode",           utf_8_decode,                   METH_VARARGS},
+    {"utf_7_encode",           utf_7_encode,                   METH_VARARGS},
+    {"utf_7_decode",           utf_7_decode,                   METH_VARARGS},
+    {"utf_16_encode",          utf_16_encode,                  METH_VARARGS},
+    {"utf_16_le_encode",       utf_16_le_encode,               METH_VARARGS},
+    {"utf_16_be_encode",       utf_16_be_encode,               METH_VARARGS},
+    {"utf_16_decode",          utf_16_decode,                  METH_VARARGS},
+    {"utf_16_le_decode",       utf_16_le_decode,               METH_VARARGS},
+    {"utf_16_be_decode",       utf_16_be_decode,               METH_VARARGS},
+    {"utf_16_ex_decode",       utf_16_ex_decode,               METH_VARARGS},
+    {"unicode_escape_encode",  unicode_escape_encode,          METH_VARARGS},
+    {"unicode_escape_decode",  unicode_escape_decode,          METH_VARARGS},
+    {"unicode_internal_encode",        unicode_internal_encode,        METH_VARARGS},
+    {"unicode_internal_decode",        unicode_internal_decode,        METH_VARARGS},
+    {"raw_unicode_escape_encode", raw_unicode_escape_encode,   METH_VARARGS},
+    {"raw_unicode_escape_decode", raw_unicode_escape_decode,   METH_VARARGS},
+    {"latin_1_encode",                 latin_1_encode,                 METH_VARARGS},
+    {"latin_1_decode",                 latin_1_decode,                 METH_VARARGS},
+    {"ascii_encode",           ascii_encode,                   METH_VARARGS},
+    {"ascii_decode",           ascii_decode,                   METH_VARARGS},
+    {"charmap_encode",                 charmap_encode,                 METH_VARARGS},
+    {"charmap_decode",                 charmap_decode,                 METH_VARARGS},
+    {"readbuffer_encode",      readbuffer_encode,              METH_VARARGS},
+    {"charbuffer_encode",      charbuffer_encode,              METH_VARARGS},
 #if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
-    {"mbcs_encode",            mbcs_encode,                    1},
-    {"mbcs_decode",            mbcs_decode,                    1},
+    {"mbcs_encode",            mbcs_encode,                    METH_VARARGS},
+    {"mbcs_decode",            mbcs_decode,                    METH_VARARGS},
 #endif
 #endif /* Py_USING_UNICODE */
     {NULL, NULL}               /* sentinel */
index 44f6420c715bfc3fe1bb72e7382427da2af57c88..ccfab516a985acb3c5104f8f8b5ed437e43c1cb5 100644 (file)
@@ -1763,40 +1763,40 @@ Tkapp_InterpAddr(PyObject *self, PyObject *args)
 
 static PyMethodDef Tkapp_methods[] =
 {
-       {"call",               Tkapp_Call, 0},
-       {"globalcall",         Tkapp_GlobalCall, 0},
-       {"eval",               Tkapp_Eval, 1},
-       {"globaleval",         Tkapp_GlobalEval, 1},
-       {"evalfile",           Tkapp_EvalFile, 1},
-       {"record",             Tkapp_Record, 1},
-       {"adderrorinfo",       Tkapp_AddErrorInfo, 1},
-       {"setvar",             Tkapp_SetVar, 1},
-       {"globalsetvar",       Tkapp_GlobalSetVar, 1},
-       {"getvar",             Tkapp_GetVar, 1},
-       {"globalgetvar",       Tkapp_GlobalGetVar, 1},
-       {"unsetvar",           Tkapp_UnsetVar, 1},
-       {"globalunsetvar",     Tkapp_GlobalUnsetVar, 1},
-       {"getint",             Tkapp_GetInt, 1},
-       {"getdouble",          Tkapp_GetDouble, 1},
-       {"getboolean",         Tkapp_GetBoolean, 1},
-       {"exprstring",         Tkapp_ExprString, 1},
-       {"exprlong",           Tkapp_ExprLong, 1},
-       {"exprdouble",         Tkapp_ExprDouble, 1},
-       {"exprboolean",        Tkapp_ExprBoolean, 1},
-       {"splitlist",          Tkapp_SplitList, 1},
-       {"split",              Tkapp_Split, 1},
-       {"merge",              Tkapp_Merge, 0},
-       {"createcommand",      Tkapp_CreateCommand, 1},
-       {"deletecommand",      Tkapp_DeleteCommand, 1},
+       {"call",               Tkapp_Call, METH_OLDARGS},
+       {"globalcall",         Tkapp_GlobalCall, METH_OLDARGS},
+       {"eval",               Tkapp_Eval, METH_VARARGS},
+       {"globaleval",         Tkapp_GlobalEval, METH_VARARGS},
+       {"evalfile",           Tkapp_EvalFile, METH_VARARGS},
+       {"record",             Tkapp_Record, METH_VARARGS},
+       {"adderrorinfo",       Tkapp_AddErrorInfo, METH_VARARGS},
+       {"setvar",             Tkapp_SetVar, METH_VARARGS},
+       {"globalsetvar",       Tkapp_GlobalSetVar, METH_VARARGS},
+       {"getvar",             Tkapp_GetVar, METH_VARARGS},
+       {"globalgetvar",       Tkapp_GlobalGetVar, METH_VARARGS},
+       {"unsetvar",           Tkapp_UnsetVar, METH_VARARGS},
+       {"globalunsetvar",     Tkapp_GlobalUnsetVar, METH_VARARGS},
+       {"getint",             Tkapp_GetInt, METH_VARARGS},
+       {"getdouble",          Tkapp_GetDouble, METH_VARARGS},
+       {"getboolean",         Tkapp_GetBoolean, METH_VARARGS},
+       {"exprstring",         Tkapp_ExprString, METH_VARARGS},
+       {"exprlong",           Tkapp_ExprLong, METH_VARARGS},
+       {"exprdouble",         Tkapp_ExprDouble, METH_VARARGS},
+       {"exprboolean",        Tkapp_ExprBoolean, METH_VARARGS},
+       {"splitlist",          Tkapp_SplitList, METH_VARARGS},
+       {"split",              Tkapp_Split, METH_VARARGS},
+       {"merge",              Tkapp_Merge, METH_OLDARGS},
+       {"createcommand",      Tkapp_CreateCommand, METH_VARARGS},
+       {"deletecommand",      Tkapp_DeleteCommand, METH_VARARGS},
 #ifdef HAVE_CREATEFILEHANDLER
-       {"createfilehandler",  Tkapp_CreateFileHandler, 1},
-       {"deletefilehandler",  Tkapp_DeleteFileHandler, 1},
+       {"createfilehandler",  Tkapp_CreateFileHandler, METH_VARARGS},
+       {"deletefilehandler",  Tkapp_DeleteFileHandler, METH_VARARGS},
 #endif
-       {"createtimerhandler", Tkapp_CreateTimerHandler, 1},
-       {"mainloop",           Tkapp_MainLoop, 1},
-       {"dooneevent",         Tkapp_DoOneEvent, 1},
-       {"quit",               Tkapp_Quit, 1},
-       {"interpaddr",         Tkapp_InterpAddr, 1},
+       {"createtimerhandler", Tkapp_CreateTimerHandler, METH_VARARGS},
+       {"mainloop",           Tkapp_MainLoop, METH_VARARGS},
+       {"dooneevent",         Tkapp_DoOneEvent, METH_VARARGS},
+       {"quit",               Tkapp_Quit, METH_VARARGS},
+       {"interpaddr",         Tkapp_InterpAddr, METH_VARARGS},
        {NULL,                 NULL}
 };
 
@@ -1978,16 +1978,16 @@ Tkinter_Create(PyObject *self, PyObject *args)
 
 static PyMethodDef moduleMethods[] =
 {
-       {"_flatten",           Tkinter_Flatten, 1},
-       {"create",             Tkinter_Create, 1},
+       {"_flatten",           Tkinter_Flatten, METH_VARARGS},
+       {"create",             Tkinter_Create, METH_VARARGS},
 #ifdef HAVE_CREATEFILEHANDLER
-       {"createfilehandler",  Tkapp_CreateFileHandler, 1},
-       {"deletefilehandler",  Tkapp_DeleteFileHandler, 1},
+       {"createfilehandler",  Tkapp_CreateFileHandler, METH_VARARGS},
+       {"deletefilehandler",  Tkapp_DeleteFileHandler, METH_VARARGS},
 #endif
-       {"createtimerhandler", Tkapp_CreateTimerHandler, 1},
-       {"mainloop",           Tkapp_MainLoop, 1},
-       {"dooneevent",         Tkapp_DoOneEvent, 1},
-       {"quit",               Tkapp_Quit, 1},
+       {"createtimerhandler", Tkapp_CreateTimerHandler, METH_VARARGS},
+       {"mainloop",           Tkapp_MainLoop, METH_VARARGS},
+       {"dooneevent",         Tkapp_DoOneEvent, METH_VARARGS},
+       {"quit",               Tkapp_Quit, METH_VARARGS},
        {NULL,                 NULL}
 };
 
index d9a398fc0bfa2272e3a5a136a7df8b96ee1bba9c..9adbc7b45c7984d799885e97b458379476bd44d7 100644 (file)
@@ -1343,29 +1343,29 @@ audioop_adpcm2lin(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef audioop_methods[] = {
-       { "max", audioop_max },
-       { "minmax", audioop_minmax },
-       { "avg", audioop_avg },
-       { "maxpp", audioop_maxpp },
-       { "avgpp", audioop_avgpp },
-       { "rms", audioop_rms },
-       { "findfit", audioop_findfit },
-       { "findmax", audioop_findmax },
-       { "findfactor", audioop_findfactor },
-       { "cross", audioop_cross },
-       { "mul", audioop_mul },
-       { "add", audioop_add },
-       { "bias", audioop_bias },
-       { "ulaw2lin", audioop_ulaw2lin },
-       { "lin2ulaw", audioop_lin2ulaw },
-       { "lin2lin", audioop_lin2lin },
-       { "adpcm2lin", audioop_adpcm2lin },
-       { "lin2adpcm", audioop_lin2adpcm },
-       { "tomono", audioop_tomono },
-       { "tostereo", audioop_tostereo },
-       { "getsample", audioop_getsample },
-       { "reverse", audioop_reverse },
-       { "ratecv", audioop_ratecv, 1 },
+       { "max", audioop_max, METH_OLDARGS },
+       { "minmax", audioop_minmax, METH_OLDARGS },
+       { "avg", audioop_avg, METH_OLDARGS },
+       { "maxpp", audioop_maxpp, METH_OLDARGS },
+       { "avgpp", audioop_avgpp, METH_OLDARGS },
+       { "rms", audioop_rms, METH_OLDARGS },
+       { "findfit", audioop_findfit, METH_OLDARGS },
+       { "findmax", audioop_findmax, METH_OLDARGS },
+       { "findfactor", audioop_findfactor, METH_OLDARGS },
+       { "cross", audioop_cross, METH_OLDARGS },
+       { "mul", audioop_mul, METH_OLDARGS },
+       { "add", audioop_add, METH_OLDARGS },
+       { "bias", audioop_bias, METH_OLDARGS },
+       { "ulaw2lin", audioop_ulaw2lin, METH_OLDARGS },
+       { "lin2ulaw", audioop_lin2ulaw, METH_OLDARGS },
+       { "lin2lin", audioop_lin2lin, METH_OLDARGS },
+       { "adpcm2lin", audioop_adpcm2lin, METH_OLDARGS },
+       { "lin2adpcm", audioop_lin2adpcm, METH_OLDARGS },
+       { "tomono", audioop_tomono, METH_OLDARGS },
+       { "tostereo", audioop_tostereo, METH_OLDARGS },
+       { "getsample", audioop_getsample, METH_OLDARGS },
+       { "reverse", audioop_reverse, METH_OLDARGS },
+       { "ratecv", audioop_ratecv, METH_VARARGS },
        { 0,          0 }
 };
 
index d51f3b4991d5e127fe1235a619a15df0844ea50e..85dfa8329c1ce0f610c1fa5c8cc299d1ab2757b2 100644 (file)
@@ -652,15 +652,15 @@ bsddb_sync(bsddbobject *dp, PyObject *args)
        return PyInt_FromLong(status = 0);
 }
 static PyMethodDef bsddb_methods[] = {
-       {"close",               (PyCFunction)bsddb_close},
-       {"keys",                (PyCFunction)bsddb_keys},
-       {"has_key",             (PyCFunction)bsddb_has_key},
-       {"set_location",        (PyCFunction)bsddb_set_location},
-       {"next",                (PyCFunction)bsddb_next},
-       {"previous",    (PyCFunction)bsddb_previous},
-       {"first",               (PyCFunction)bsddb_first},
-       {"last",                (PyCFunction)bsddb_last},
-       {"sync",                (PyCFunction)bsddb_sync},
+       {"close",               (PyCFunction)bsddb_close, METH_OLDARGS},
+       {"keys",                (PyCFunction)bsddb_keys, METH_OLDARGS},
+       {"has_key",             (PyCFunction)bsddb_has_key, METH_OLDARGS},
+       {"set_location",        (PyCFunction)bsddb_set_location, METH_OLDARGS},
+       {"next",                (PyCFunction)bsddb_next, METH_OLDARGS},
+       {"previous",    (PyCFunction)bsddb_previous, METH_OLDARGS},
+       {"first",               (PyCFunction)bsddb_first, METH_OLDARGS},
+       {"last",                (PyCFunction)bsddb_last, METH_OLDARGS},
+       {"sync",                (PyCFunction)bsddb_sync, METH_OLDARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
@@ -849,9 +849,9 @@ bsdrnopen(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef bsddbmodule_methods[] = {
-       {"hashopen",    (PyCFunction)bsdhashopen, 1},
-       {"btopen",      (PyCFunction)bsdbtopen, 1},
-       {"rnopen",      (PyCFunction)bsdrnopen, 1},
+       {"hashopen",    (PyCFunction)bsdhashopen, METH_VARARGS},
+       {"btopen",      (PyCFunction)bsdbtopen, METH_VARARGS},
+       {"rnopen",      (PyCFunction)bsdrnopen, METH_VARARGS},
        {0,             0},
 };
 
index f0dd599c03702a5fe0bafadd79c6a12d1c98e671..b9772776b286e06168add8bb2357cea074f50478 100644 (file)
@@ -353,24 +353,24 @@ CD_togglepause(cdplayerobject *self, PyObject *args)
 }
        
 static PyMethodDef cdplayer_methods[] = {
-       {"allowremoval",        (PyCFunction)CD_allowremoval,   1},
-       {"bestreadsize",        (PyCFunction)CD_bestreadsize,   1},
-       {"close",               (PyCFunction)CD_close,          1},
-       {"eject",               (PyCFunction)CD_eject,          1},
-       {"getstatus",           (PyCFunction)CD_getstatus,              1},
-       {"gettrackinfo",        (PyCFunction)CD_gettrackinfo,   1},
-       {"msftoblock",          (PyCFunction)CD_msftoblock,             1},
-       {"play",                (PyCFunction)CD_play,           1},
-       {"playabs",             (PyCFunction)CD_playabs,                1},
-       {"playtrack",           (PyCFunction)CD_playtrack,              1},
-       {"playtrackabs",        (PyCFunction)CD_playtrackabs,   1},
-       {"preventremoval",      (PyCFunction)CD_preventremoval, 1},
-       {"readda",              (PyCFunction)CD_readda,         1},
-       {"seek",                (PyCFunction)CD_seek,           1},
-       {"seekblock",           (PyCFunction)CD_seekblock,              1},
-       {"seektrack",           (PyCFunction)CD_seektrack,              1},
-       {"stop",                (PyCFunction)CD_stop,           1},
-       {"togglepause",         (PyCFunction)CD_togglepause,    1},
+       {"allowremoval",        (PyCFunction)CD_allowremoval,   METH_VARARGS},
+       {"bestreadsize",        (PyCFunction)CD_bestreadsize,   METH_VARARGS},
+       {"close",               (PyCFunction)CD_close,          METH_VARARGS},
+       {"eject",               (PyCFunction)CD_eject,          METH_VARARGS},
+       {"getstatus",           (PyCFunction)CD_getstatus,              METH_VARARGS},
+       {"gettrackinfo",        (PyCFunction)CD_gettrackinfo,   METH_VARARGS},
+       {"msftoblock",          (PyCFunction)CD_msftoblock,             METH_VARARGS},
+       {"play",                (PyCFunction)CD_play,           METH_VARARGS},
+       {"playabs",             (PyCFunction)CD_playabs,                METH_VARARGS},
+       {"playtrack",           (PyCFunction)CD_playtrack,              METH_VARARGS},
+       {"playtrackabs",        (PyCFunction)CD_playtrackabs,   METH_VARARGS},
+       {"preventremoval",      (PyCFunction)CD_preventremoval, METH_VARARGS},
+       {"readda",              (PyCFunction)CD_readda,         METH_VARARGS},
+       {"seek",                (PyCFunction)CD_seek,           METH_VARARGS},
+       {"seekblock",           (PyCFunction)CD_seekblock,              METH_VARARGS},
+       {"seektrack",           (PyCFunction)CD_seektrack,              METH_VARARGS},
+       {"stop",                (PyCFunction)CD_stop,           METH_VARARGS},
+       {"togglepause",         (PyCFunction)CD_togglepause,    METH_VARARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -653,13 +653,13 @@ CD_addcallback(cdparserobject *self, PyObject *args)
 }
 
 static PyMethodDef cdparser_methods[] = {
-       {"addcallback",         (PyCFunction)CD_addcallback,    1},
-       {"deleteparser",        (PyCFunction)CD_deleteparser,   1},
-       {"parseframe",          (PyCFunction)CD_parseframe,     1},
-       {"removecallback",      (PyCFunction)CD_removecallback, 1},
-       {"resetparser",         (PyCFunction)CD_resetparser,    1},
+       {"addcallback",         (PyCFunction)CD_addcallback,    METH_VARARGS},
+       {"deleteparser",        (PyCFunction)CD_deleteparser,   METH_VARARGS},
+       {"parseframe",          (PyCFunction)CD_parseframe,     METH_VARARGS},
+       {"removecallback",      (PyCFunction)CD_removecallback, METH_VARARGS},
+       {"resetparser",         (PyCFunction)CD_resetparser,    METH_VARARGS},
                                                /* backward compatibility */
-       {"setcallback",         (PyCFunction)CD_addcallback,    1},
+       {"setcallback",         (PyCFunction)CD_addcallback,    METH_VARARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -749,9 +749,9 @@ CD_msftoframe(PyObject *self, PyObject *args)
 }
        
 static PyMethodDef CD_methods[] = {
-       {"open",                (PyCFunction)CD_open,           1},
-       {"createparser",        (PyCFunction)CD_createparser,   1},
-       {"msftoframe",          (PyCFunction)CD_msftoframe,     1},
+       {"open",                (PyCFunction)CD_open,           METH_VARARGS},
+       {"createparser",        (PyCFunction)CD_createparser,   METH_VARARGS},
+       {"msftoframe",          (PyCFunction)CD_msftoframe,     METH_VARARGS},
        {NULL,          NULL}   /* Sentinel */
 };
 
index 13011d2195d153b07068f858f34ad85f354a6940..65e7f789851e305833c5187c038646ebb61bb367 100644 (file)
@@ -600,37 +600,37 @@ clm_ReadHeader(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef compressor_methods[] = {
-       {"close",               clm_CloseCompressor}, /* alias */
-       {"CloseCompressor",     clm_CloseCompressor},
-       {"Compress",            clm_Compress},
-       {"GetDefault",          clm_GetDefault},
-       {"GetMinMax",           clm_GetMinMax},
-       {"GetName",             clm_GetName},
-       {"GetParam",            clm_GetParam},
-       {"GetParamID",          clm_GetParamID},
-       {"GetParams",           clm_GetParams},
-       {"QueryParams",         clm_QueryParams},
-       {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle},
-       {"SetParam",            clm_SetParam},
-       {"SetParams",           clm_SetParams},
+       {"close",               clm_CloseCompressor, METH_OLDARGS}, /* alias */
+       {"CloseCompressor",     clm_CloseCompressor, METH_OLDARGS},
+       {"Compress",            clm_Compress, METH_OLDARGS},
+       {"GetDefault",          clm_GetDefault, METH_OLDARGS},
+       {"GetMinMax",           clm_GetMinMax, METH_OLDARGS},
+       {"GetName",             clm_GetName, METH_OLDARGS},
+       {"GetParam",            clm_GetParam, METH_OLDARGS},
+       {"GetParamID",          clm_GetParamID, METH_OLDARGS},
+       {"GetParams",           clm_GetParams, METH_OLDARGS},
+       {"QueryParams",         clm_QueryParams, METH_OLDARGS},
+       {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_OLDARGS},
+       {"SetParam",            clm_SetParam, METH_OLDARGS},
+       {"SetParams",           clm_SetParams, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
 static PyMethodDef decompressor_methods[] = {
-       {"close",               clm_CloseDecompressor}, /* alias */
-       {"CloseDecompressor",   clm_CloseDecompressor},
-       {"Decompress",          clm_Decompress},
-       {"GetDefault",          clm_GetDefault},
-       {"GetMinMax",           clm_GetMinMax},
-       {"GetName",             clm_GetName},
-       {"GetParam",            clm_GetParam},
-       {"GetParamID",          clm_GetParamID},
-       {"GetParams",           clm_GetParams},
-       {"ReadHeader",          clm_ReadHeader},
-       {"QueryParams",         clm_QueryParams},
-       {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle},
-       {"SetParam",            clm_SetParam},
-       {"SetParams",           clm_SetParams},
+       {"close",               clm_CloseDecompressor, METH_OLDARGS},   /* alias */
+       {"CloseDecompressor",   clm_CloseDecompressor, METH_OLDARGS},
+       {"Decompress",          clm_Decompress, METH_OLDARGS},
+       {"GetDefault",          clm_GetDefault, METH_OLDARGS},
+       {"GetMinMax",           clm_GetMinMax, METH_OLDARGS},
+       {"GetName",             clm_GetName, METH_OLDARGS},
+       {"GetParam",            clm_GetParam, METH_OLDARGS},
+       {"GetParamID",          clm_GetParamID, METH_OLDARGS},
+       {"GetParams",           clm_GetParams, METH_OLDARGS},
+       {"ReadHeader",          clm_ReadHeader, METH_OLDARGS},
+       {"QueryParams",         clm_QueryParams, METH_OLDARGS},
+       {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_OLDARGS},
+       {"SetParam",            clm_SetParam, METH_OLDARGS},
+       {"SetParams",           clm_SetParams, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -936,30 +936,30 @@ cvt_type(PyObject *self, PyObject *args)
 #endif
 
 static PyMethodDef cl_methods[] = {
-       {"CompressImage",       cl_CompressImage},
-       {"DecompressImage",     cl_DecompressImage},
-       {"GetAlgorithmName",    cl_GetAlgorithmName},
-       {"OpenCompressor",      cl_OpenCompressor},
-       {"OpenDecompressor",    cl_OpenDecompressor},
-       {"QueryAlgorithms",     cl_QueryAlgorithms},
-       {"QueryMaxHeaderSize",  cl_QueryMaxHeaderSize},
-       {"QueryScheme",         cl_QueryScheme},
-       {"QuerySchemeFromName", cl_QuerySchemeFromName},
-       {"SetDefault",          cl_SetDefault},
-       {"SetMax",              cl_SetMax},
-       {"SetMin",              cl_SetMin},
-       {"BytesPerSample",      cl_BytesPerSample},
-       {"BytesPerPixel",       cl_BytesPerPixel},
-       {"AudioFormatName",     cl_AudioFormatName},
-       {"VideoFormatName",     cl_VideoFormatName},
-       {"AlgorithmNumber",     cl_AlgorithmNumber},
-       {"AlgorithmType",       cl_AlgorithmType},
-       {"Algorithm",           cl_Algorithm},
-       {"ParamNumber",         cl_ParamNumber},
-       {"ParamType",           cl_ParamType},
-       {"ParamID",             cl_ParamID},
+       {"CompressImage",       cl_CompressImage, METH_OLDARGS},
+       {"DecompressImage",     cl_DecompressImage, METH_OLDARGS},
+       {"GetAlgorithmName",    cl_GetAlgorithmName, METH_OLDARGS},
+       {"OpenCompressor",      cl_OpenCompressor, METH_OLDARGS},
+       {"OpenDecompressor",    cl_OpenDecompressor, METH_OLDARGS},
+       {"QueryAlgorithms",     cl_QueryAlgorithms, METH_OLDARGS},
+       {"QueryMaxHeaderSize",  cl_QueryMaxHeaderSize, METH_OLDARGS},
+       {"QueryScheme",         cl_QueryScheme, METH_OLDARGS},
+       {"QuerySchemeFromName", cl_QuerySchemeFromName, METH_OLDARGS},
+       {"SetDefault",          cl_SetDefault, METH_OLDARGS},
+       {"SetMax",              cl_SetMax, METH_OLDARGS},
+       {"SetMin",              cl_SetMin, METH_OLDARGS},
+       {"BytesPerSample",      cl_BytesPerSample, METH_OLDARGS},
+       {"BytesPerPixel",       cl_BytesPerPixel, METH_OLDARGS},
+       {"AudioFormatName",     cl_AudioFormatName, METH_OLDARGS},
+       {"VideoFormatName",     cl_VideoFormatName, METH_OLDARGS},
+       {"AlgorithmNumber",     cl_AlgorithmNumber, METH_OLDARGS},
+       {"AlgorithmType",       cl_AlgorithmType, METH_OLDARGS},
+       {"Algorithm",           cl_Algorithm, METH_OLDARGS},
+       {"ParamNumber",         cl_ParamNumber, METH_OLDARGS},
+       {"ParamType",           cl_ParamType, METH_OLDARGS},
+       {"ParamID",             cl_ParamID, METH_OLDARGS},
 #ifdef CLDEBUG
-       {"cvt_type",            cvt_type},
+       {"cvt_type",            cvt_type, METH_OLDARGS},
 #endif
        {NULL,                  NULL} /* Sentinel */
 };
index 46ae926a3a0342545b1d95aa3f0b93316f2bc3bc..d2364d4fbe32fdcf5b37ed8422f1100e715539f3 100644 (file)
@@ -120,9 +120,9 @@ dl_call(dlobject *xp, PyObject *args)
 }
 
 static PyMethodDef dlobject_methods[] = {
-       {"call",        (PyCFunction)dl_call,   1 /* varargs */},
-       {"sym",         (PyCFunction)dl_sym},
-       {"close",       (PyCFunction)dl_close},
+       {"call",        (PyCFunction)dl_call, METH_VARARGS},
+       {"sym",         (PyCFunction)dl_sym, METH_OLDARGS},
+       {"close",       (PyCFunction)dl_close, METH_OLDARGS},
        {NULL,          NULL}                    /* Sentinel */
 };
 
@@ -187,7 +187,7 @@ dl_open(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef dl_methods[] = {
-       {"open",        dl_open},
+       {"open",        dl_open, METH_OLDARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
index ee1f068244d1e4ba2e1baabb23bb08f25fce37e9..f69b76d637b3128b49bcf0a170bf1317b78876cf 100644 (file)
@@ -252,18 +252,18 @@ generic_set_object_shortcut(genericobject *g, PyObject *args)
 }
 
 static PyMethodDef generic_methods[] = {
-       {"set_call_back",       (PyCFunction)generic_set_call_back},
-       {"delete_object",       (PyCFunction)generic_delete_object},
-       {"show_object",         (PyCFunction)generic_show_object},
-       {"hide_object",         (PyCFunction)generic_hide_object},
-       {"redraw_object",       (PyCFunction)generic_redraw_object},
+       {"set_call_back",       (PyCFunction)generic_set_call_back, METH_OLDARGS},
+       {"delete_object",       (PyCFunction)generic_delete_object, METH_OLDARGS},
+       {"show_object",         (PyCFunction)generic_show_object, METH_OLDARGS},
+       {"hide_object",         (PyCFunction)generic_hide_object, METH_OLDARGS},
+       {"redraw_object",       (PyCFunction)generic_redraw_object, METH_OLDARGS},
 #ifdef OBSOLETE_FORMS_CALLS
-       {"freeze_object",       (PyCFunction)generic_freeze_object},
-       {"unfreeze_object",     (PyCFunction)generic_unfreeze_object},
+       {"freeze_object",       (PyCFunction)generic_freeze_object, METH_OLDARGS},
+       {"unfreeze_object",     (PyCFunction)generic_unfreeze_object, METH_OLDARGS},
 #endif
-       {"activate_object",     (PyCFunction)generic_activate_object},
-       {"deactivate_object",   (PyCFunction)generic_deactivate_object},
-       {"set_object_shortcut", (PyCFunction)generic_set_object_shortcut},
+       {"activate_object",     (PyCFunction)generic_activate_object, METH_OLDARGS},
+       {"deactivate_object",   (PyCFunction)generic_deactivate_object, METH_OLDARGS},
+       {"set_object_shortcut", (PyCFunction)generic_set_object_shortcut, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -2081,44 +2081,44 @@ forms_get_filename(PyObject *f, PyObject *args)
 
 static PyMethodDef forms_methods[] = {
 /* adm */
-       {"make_form",           forms_make_form},
-       {"activate_all_forms",  forms_activate_all_forms},
-       {"deactivate_all_forms",forms_deactivate_all_forms},
+       {"make_form",           forms_make_form, METH_OLDARGS},
+       {"activate_all_forms",  forms_activate_all_forms, METH_OLDARGS},
+       {"deactivate_all_forms",forms_deactivate_all_forms, METH_OLDARGS},
 /* gl support wrappers */
-       {"qdevice",             forms_qdevice},
-       {"unqdevice",           forms_unqdevice},
-       {"isqueued",            forms_isqueued},
-       {"qtest",               forms_qtest},
-       {"qread",               forms_qread},
-/*     {"blkqread",            forms_blkqread}, */
-       {"qreset",              forms_qreset},
-       {"qenter",              forms_qenter},
-       {"get_mouse",           forms_get_mouse},
-       {"tie",                 forms_tie},
-/*     {"new_events",          forms_new_events}, */
-       {"color",               forms_color},
-       {"mapcolor",            forms_mapcolor},
-       {"getmcolor",           forms_getmcolor},
+       {"qdevice",             forms_qdevice, METH_OLDARGS},
+       {"unqdevice",           forms_unqdevice, METH_OLDARGS},
+       {"isqueued",            forms_isqueued, METH_OLDARGS},
+       {"qtest",               forms_qtest, METH_OLDARGS},
+       {"qread",               forms_qread, METH_OLDARGS},
+/*     {"blkqread",            forms_blkqread, METH_OLDARGS}, */
+       {"qreset",              forms_qreset, METH_OLDARGS},
+       {"qenter",              forms_qenter, METH_OLDARGS},
+       {"get_mouse",           forms_get_mouse, METH_OLDARGS},
+       {"tie",                 forms_tie, METH_OLDARGS},
+/*     {"new_events",          forms_new_events, METH_OLDARGS}, */
+       {"color",               forms_color, METH_OLDARGS},
+       {"mapcolor",            forms_mapcolor, METH_OLDARGS},
+       {"getmcolor",           forms_getmcolor, METH_OLDARGS},
 /* interaction */
-       {"do_forms",            forms_do_forms},
-       {"do_only_forms",       forms_do_only_forms},
-       {"check_forms",         forms_check_forms},
-       {"check_only_forms",    forms_check_only_forms},
-       {"set_event_call_back", forms_set_event_call_back},
+       {"do_forms",            forms_do_forms, METH_OLDARGS},
+       {"do_only_forms",       forms_do_only_forms, METH_OLDARGS},
+       {"check_forms",         forms_check_forms, METH_OLDARGS},
+       {"check_only_forms",    forms_check_only_forms, METH_OLDARGS},
+       {"set_event_call_back", forms_set_event_call_back, METH_OLDARGS},
 /* goodies */
-       {"show_message",        forms_show_message},
-       {"show_question",       forms_show_question},
-       {"show_choice",         forms_show_choice},
-       {"show_input",          forms_show_input},
-       {"show_file_selector",  forms_file_selector},
-       {"file_selector",       forms_file_selector}, /* BW compat */
-       {"get_directory",       forms_get_directory},
-       {"get_pattern",         forms_get_pattern},
-       {"get_filename",        forms_get_filename},
-       {"set_graphics_mode",   forms_set_graphics_mode},
-       {"get_rgbmode",         forms_get_rgbmode},
-       {"show_errors",         forms_show_errors},
-       {"set_font_name",       forms_set_font_name},
+       {"show_message",        forms_show_message, METH_OLDARGS},
+       {"show_question",       forms_show_question, METH_OLDARGS},
+       {"show_choice",         forms_show_choice, METH_OLDARGS},
+       {"show_input",          forms_show_input, METH_OLDARGS},
+       {"show_file_selector",  forms_file_selector, METH_OLDARGS},
+       {"file_selector",       forms_file_selector, METH_OLDARGS}, /* BW compat */
+       {"get_directory",       forms_get_directory, METH_OLDARGS},
+       {"get_pattern",         forms_get_pattern, METH_OLDARGS},
+       {"get_filename",        forms_get_filename, METH_OLDARGS},
+       {"set_graphics_mode",   forms_set_graphics_mode, METH_OLDARGS},
+       {"get_rgbmode",         forms_get_rgbmode, METH_OLDARGS},
+       {"show_errors",         forms_show_errors, METH_OLDARGS},
+       {"set_font_name",       forms_set_font_name, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
index a2eb9c64b3e17a7262d994ebf397caaa14b3cfa7..ecd96d524d60de40c087b59cec61df162ec99cb7 100644 (file)
@@ -126,15 +126,15 @@ fh_getstrwidth(fhobject *self, PyObject *args)
 }
 
 static PyMethodDef fh_methods[] = {
-       {"scalefont",   (PyCFunction)fh_scalefont},
-       {"setfont",     (PyCFunction)fh_setfont},
-       {"getfontname", (PyCFunction)fh_getfontname},
-       {"getcomment",  (PyCFunction)fh_getcomment},
-       {"getfontinfo", (PyCFunction)fh_getfontinfo},
+       {"scalefont",   (PyCFunction)fh_scalefont, METH_OLDARGS},
+       {"setfont",     (PyCFunction)fh_setfont, METH_OLDARGS},
+       {"getfontname", (PyCFunction)fh_getfontname, METH_OLDARGS},
+       {"getcomment",  (PyCFunction)fh_getcomment, METH_OLDARGS},
+       {"getfontinfo", (PyCFunction)fh_getfontinfo, METH_OLDARGS},
 #if 0
-       {"getwholemetrics",     (PyCFunction)fh_getwholemetrics},
+       {"getwholemetrics",     (PyCFunction)fh_getwholemetrics, METH_OLDARGS},
 #endif
-       {"getstrwidth", (PyCFunction)fh_getstrwidth},
+       {"getstrwidth", (PyCFunction)fh_getstrwidth, METH_OLDARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
@@ -258,12 +258,12 @@ fm_fontpath(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef fm_methods[] = {
-       {"init",        fm_init},
-       {"findfont",    fm_findfont},
-       {"enumerate",   fm_enumerate},
-       {"prstr",       fm_prstr},
-       {"setpath",     fm_setpath},
-       {"fontpath",    fm_fontpath},
+       {"init",        fm_init, METH_OLDARGS},
+       {"findfont",    fm_findfont, METH_OLDARGS},
+       {"enumerate",   fm_enumerate, METH_OLDARGS},
+       {"prstr",       fm_prstr, METH_OLDARGS},
+       {"setpath",     fm_setpath, METH_OLDARGS},
+       {"fontpath",    fm_fontpath, METH_OLDARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
index 843bc165fa782e9dd9ae480d77749a07a34410eb..485ec5ae5c980f69a32d868fbbbf5bcb39a73b1c 100644 (file)
@@ -91,8 +91,8 @@ static PyObject *turnon_sigfpe            (PyObject *self,PyObject *args);
 static PyObject *turnoff_sigfpe           (PyObject *self,PyObject *args);
 
 static PyMethodDef fpectl_methods[] = {
-    {"turnon_sigfpe",           (PyCFunction) turnon_sigfpe,            1},
-    {"turnoff_sigfpe",          (PyCFunction) turnoff_sigfpe,           1},
+    {"turnon_sigfpe",           (PyCFunction) turnon_sigfpe,            METH_VARARGS},
+    {"turnoff_sigfpe",          (PyCFunction) turnoff_sigfpe,           METH_VARARGS},
     {0,0}
 };
 
index 31c2f222155de4ef0adf68c673c26157250229dd..565d0b7da9b63d8285c186dcb352b41db7e87be2 100644 (file)
@@ -54,7 +54,7 @@ static double nest3(double);
 static void printerr(double);
 
 static PyMethodDef fpetest_methods[] = {
-    {"test",            (PyCFunction) test,             1},
+    {"test",            (PyCFunction) test,             METH_VARARGS},
     {0,0}
 };
 
index 586133bfed21d25c88a15a018645066f152b293b..ca3104017a0984bd33240fb2a9ba3fd547dd0d98 100644 (file)
@@ -677,21 +677,21 @@ imageop_mul(object *self, object *args)
 */
 
 static PyMethodDef imageop_methods[] = {
-       { "crop",               imageop_crop },
-       { "scale",              imageop_scale },
-       { "grey2mono",          imageop_grey2mono },
-       { "grey2grey2",         imageop_grey2grey2 },
-       { "grey2grey4",         imageop_grey2grey4 },
-       { "dither2mono",        imageop_dither2mono },
-       { "dither2grey2",       imageop_dither2grey2 },
-       { "mono2grey",          imageop_mono2grey },
-       { "grey22grey",         imageop_grey22grey },
-       { "grey42grey",         imageop_grey42grey },
-       { "tovideo",            imageop_tovideo },
-       { "rgb2rgb8",           imageop_rgb2rgb8 },
-       { "rgb82rgb",           imageop_rgb82rgb },
-       { "rgb2grey",           imageop_rgb2grey },
-       { "grey2rgb",           imageop_grey2rgb },
+       { "crop",               imageop_crop, METH_OLDARGS },
+       { "scale",              imageop_scale, METH_OLDARGS },
+       { "grey2mono",          imageop_grey2mono, METH_OLDARGS },
+       { "grey2grey2",         imageop_grey2grey2, METH_OLDARGS },
+       { "grey2grey4",         imageop_grey2grey4, METH_OLDARGS },
+       { "dither2mono",        imageop_dither2mono, METH_OLDARGS },
+       { "dither2grey2",       imageop_dither2grey2, METH_OLDARGS },
+       { "mono2grey",          imageop_mono2grey, METH_OLDARGS },
+       { "grey22grey",         imageop_grey22grey, METH_OLDARGS },
+       { "grey42grey",         imageop_grey42grey, METH_OLDARGS },
+       { "tovideo",            imageop_tovideo, METH_OLDARGS },
+       { "rgb2rgb8",           imageop_rgb2rgb8, METH_OLDARGS },
+       { "rgb82rgb",           imageop_rgb82rgb, METH_OLDARGS },
+       { "rgb2grey",           imageop_rgb2grey, METH_OLDARGS },
+       { "grey2rgb",           imageop_grey2rgb, METH_OLDARGS },
        { 0,                    0 }
 };
 
index e8f0b8c5fbad97a3f790b62e8f0049955869a5a2..1cab62d7c69578cf7a283680bc7d9920dac8e35a 100644 (file)
@@ -490,11 +490,11 @@ imgfile_write(PyObject *self, PyObject *args)
 
 
 static PyMethodDef imgfile_methods[] = {
-       { "getsizes",   imgfile_getsizes },
-       { "read",       imgfile_read },
-       { "readscaled", imgfile_readscaled, 1},
-       { "write",      imgfile_write },
-       { "ttob",       imgfile_ttob },
+       { "getsizes",   imgfile_getsizes, METH_OLDARGS },
+       { "read",       imgfile_read, METH_OLDARGS },
+       { "readscaled", imgfile_readscaled, METH_VARARGS},
+       { "write",      imgfile_write, METH_OLDARGS },
+       { "ttob",       imgfile_ttob, METH_OLDARGS },
        { NULL,         NULL } /* Sentinel */
 };
 
index 6e03b4b59dc616a0a1751ba1a41ddda33c4625bc..cd1391453ce78e057898f100d9dd8a8afeea7a7f 100644 (file)
@@ -558,19 +558,19 @@ mmap_move_method(mmap_object *self, PyObject *args)
 }
 
 static struct PyMethodDef mmap_object_methods[] = {
-       {"close",       (PyCFunction) mmap_close_method,        1},
-       {"find",        (PyCFunction) mmap_find_method,         1},
-       {"flush",       (PyCFunction) mmap_flush_method,        1},
-       {"move",        (PyCFunction) mmap_move_method,         1},
-       {"read",        (PyCFunction) mmap_read_method,         1},
-       {"read_byte",   (PyCFunction) mmap_read_byte_method,    1},
-       {"readline",    (PyCFunction) mmap_read_line_method,    1},
-       {"resize",      (PyCFunction) mmap_resize_method,       1},
-       {"seek",        (PyCFunction) mmap_seek_method,         1},
-       {"size",        (PyCFunction) mmap_size_method,         1},
-       {"tell",        (PyCFunction) mmap_tell_method,         1},
-       {"write",       (PyCFunction) mmap_write_method,        1},
-       {"write_byte",  (PyCFunction) mmap_write_byte_method,   1},
+       {"close",       (PyCFunction) mmap_close_method,        METH_VARARGS},
+       {"find",        (PyCFunction) mmap_find_method,         METH_VARARGS},
+       {"flush",       (PyCFunction) mmap_flush_method,        METH_VARARGS},
+       {"move",        (PyCFunction) mmap_move_method,         METH_VARARGS},
+       {"read",        (PyCFunction) mmap_read_method,         METH_VARARGS},
+       {"read_byte",   (PyCFunction) mmap_read_byte_method,    METH_VARARGS},
+       {"readline",    (PyCFunction) mmap_read_line_method,    METH_VARARGS},
+       {"resize",      (PyCFunction) mmap_resize_method,       METH_VARARGS},
+       {"seek",        (PyCFunction) mmap_seek_method,         METH_VARARGS},
+       {"size",        (PyCFunction) mmap_size_method,         METH_VARARGS},
+       {"tell",        (PyCFunction) mmap_tell_method,         METH_VARARGS},
+       {"write",       (PyCFunction) mmap_write_method,        METH_VARARGS},
+       {"write_byte",  (PyCFunction) mmap_write_byte_method,   METH_VARARGS},
        {NULL,     NULL}       /* sentinel */
 };
 
index 04057f1fa5614b48e156eb9f480adf6b12ed411d..c4e2993b0eac3c44f49bb9533246ffef3c5e38bc 100644 (file)
@@ -1608,17 +1608,17 @@ static PyTypeObject MPZtype = {
 
 static PyMethodDef mpz_functions[] = {
 #if 0
-       {initialiser_name,      MPZ_mpz},
+       {initialiser_name,      MPZ_mpz, METH_OLDARGS},
 #else /* 0 */
        /* until guido ``fixes'' struct PyMethodDef */
-       {(char *)initialiser_name,      MPZ_mpz},
+       {(char *)initialiser_name,      MPZ_mpz, METH_OLDARGS},
 #endif /* 0 else */    
-       {"powm",                MPZ_powm},
-       {"gcd",                 MPZ_gcd},
-       {"gcdext",              MPZ_gcdext},
-       {"sqrt",                MPZ_sqrt},
-       {"sqrtrem",             MPZ_sqrtrem},
-       {"divm",                MPZ_divm},
+       {"powm",                MPZ_powm, METH_OLDARGS},
+       {"gcd",                 MPZ_gcd, METH_OLDARGS},
+       {"gcdext",              MPZ_gcdext, METH_OLDARGS},
+       {"sqrt",                MPZ_sqrt, METH_OLDARGS},
+       {"sqrtrem",             MPZ_sqrtrem, METH_OLDARGS},
+       {"divm",                MPZ_divm, METH_OLDARGS},
        {NULL,                  NULL}            /* Sentinel */
 };
 
index bcc8e9f968e9a8c9efdc74a9cbf37a0785dcb438..f8a92464c6909a22adf908a8ce649499dad35bad 100644 (file)
@@ -364,9 +364,9 @@ nis_maps (PyObject *self, PyObject *args)
 }
 
 static PyMethodDef nis_methods[] = {
-       {"match",       nis_match},
-       {"cat",         nis_cat},
-       {"maps",        nis_maps},
+       {"match",       nis_match, METH_OLDARGS},
+       {"cat",         nis_cat, METH_OLDARGS},
+       {"maps",        nis_maps, METH_OLDARGS},
        {NULL,          NULL}            /* Sentinel */
 };
 
index d08d4ea1dd37a365bf4126e9c2beaed4bd8a38e9..6c05766c879a4f1006dbf6a695582be7a1af6fd6 100644 (file)
@@ -114,7 +114,7 @@ PyPcre_exec(PcreObject *self, PyObject *args)
 }
 
 static PyMethodDef Pcre_methods[] = {
-       {"match",       (PyCFunction)PyPcre_exec,       1},
+       {"match",       (PyCFunction)PyPcre_exec,       METH_VARARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
@@ -582,8 +582,8 @@ PyPcre_expand(PyObject *self, PyObject *args)
 /* List of functions defined in the module */
 
 static PyMethodDef pcre_methods[] = {
-       {"pcre_compile",                PyPcre_compile,         1},
-       {"pcre_expand",         PyPcre_expand,          1},
+       {"pcre_compile",                PyPcre_compile,         METH_VARARGS},
+       {"pcre_expand",         PyPcre_expand,          METH_VARARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
index d901580708c003d622e1c1c88b8a6e996505bbae..43c64414cb1cfc7335b9f517cae02b8b98d05cad 100644 (file)
@@ -823,109 +823,109 @@ pure_quantify_add_annotation(PyObject *self, PyObject *args)
 static struct PyMethodDef
 pure_methods[] = {
 #ifdef COMMON_PURE_FUNCTIONS
-    {"pure_logfile_printf",            pure_pure_logfile_printf,            1},
-    {"pure_printf",                    pure_pure_printf,                    1},
-    {"pure_printf_with_banner",        pure_pure_printf_with_banner,        1},
+    {"pure_logfile_printf",            pure_pure_logfile_printf,            METH_VARARGS},
+    {"pure_printf",                    pure_pure_printf,                    METH_VARARGS},
+    {"pure_printf_with_banner",        pure_pure_printf_with_banner,        METH_VARARGS},
 #endif /* COMMON_PURE_FUNCTIONS */
 #ifdef PURIFY_H
-    {"purify_all_inuse",               pure_purify_all_inuse,               1},
-    {"purify_all_leaks",               pure_purify_all_leaks,               1},
-    {"purify_new_inuse",               pure_purify_new_inuse,               1},
-    {"purify_new_leaks",               pure_purify_new_leaks,               1},
-    {"purify_clear_inuse",             pure_purify_clear_inuse,             1},
-    {"purify_clear_leaks",             pure_purify_clear_leaks,             1},
-    {"purify_all_fds_inuse",           pure_purify_all_fds_inuse,           1},
-    {"purify_new_fds_inuse",           pure_purify_new_fds_inuse,           1},
+    {"purify_all_inuse",               pure_purify_all_inuse,               METH_VARARGS},
+    {"purify_all_leaks",               pure_purify_all_leaks,               METH_VARARGS},
+    {"purify_new_inuse",               pure_purify_new_inuse,               METH_VARARGS},
+    {"purify_new_leaks",               pure_purify_new_leaks,               METH_VARARGS},
+    {"purify_clear_inuse",             pure_purify_clear_inuse,             METH_VARARGS},
+    {"purify_clear_leaks",             pure_purify_clear_leaks,             METH_VARARGS},
+    {"purify_all_fds_inuse",           pure_purify_all_fds_inuse,           METH_VARARGS},
+    {"purify_new_fds_inuse",           pure_purify_new_fds_inuse,           METH_VARARGS},
     /* see purify.h */
-    {"purify_logfile_printf",          pure_pure_logfile_printf,            1},
-    {"purify_printf",                  pure_pure_printf,                    1},
-    {"purify_printf_with_banner",      pure_pure_printf_with_banner,        1},
+    {"purify_logfile_printf",          pure_pure_logfile_printf,            METH_VARARGS},
+    {"purify_printf",                  pure_pure_printf,                    METH_VARARGS},
+    {"purify_printf_with_banner",      pure_pure_printf_with_banner,        METH_VARARGS},
     /**/
-    {"purify_printf_with_call_chain",  pure_purify_printf_with_call_chain,  1},
-    {"purify_set_pool_id",             pure_purify_set_pool_id,             1},
-    {"purify_get_pool_id",             pure_purify_get_pool_id,             1},
-    {"purify_set_user_data",           pure_purify_set_user_data,           1},
-    {"purify_get_user_data",           pure_purify_get_user_data,           1},
-    {"purify_map_pool",                pure_purify_map_pool,                1},
-    {"purify_map_pool_id",             pure_purify_map_pool_id,             1},
-    {"purify_new_messages",            pure_purify_new_messages,            1},
-    {"purify_all_messages",            pure_purify_all_messages,            1},
-    {"purify_clear_messages",          pure_purify_clear_messages,          1},
-    {"purify_clear_new_messages",      pure_purify_clear_new_messages,      1},
-    {"purify_start_batch",             pure_purify_start_batch,             1},
-    {"purify_start_batch_show_first",  pure_purify_start_batch_show_first,  1},
-    {"purify_stop_batch",              pure_purify_stop_batch,              1},
-    {"purify_name_thread",             pure_purify_name_thread,             1},
-    {"purify_watch",                   pure_purify_watch,                   1},
-    {"purify_watch_1",                 pure_purify_watch_1,                 1},
-    {"purify_watch_2",                 pure_purify_watch_2,                 1},
-    {"purify_watch_4",                 pure_purify_watch_4,                 1},
-    {"purify_watch_8",                 pure_purify_watch_8,                 1},
-    {"purify_watch_w_1",               pure_purify_watch_w_1,               1},
-    {"purify_watch_w_2",               pure_purify_watch_w_2,               1},
-    {"purify_watch_w_4",               pure_purify_watch_w_4,               1},
-    {"purify_watch_w_8",               pure_purify_watch_w_8,               1},
-    {"purify_watch_r_1",               pure_purify_watch_r_1,               1},
-    {"purify_watch_r_2",               pure_purify_watch_r_2,               1},
-    {"purify_watch_r_4",               pure_purify_watch_r_4,               1},
-    {"purify_watch_r_8",               pure_purify_watch_r_8,               1},
-    {"purify_watch_rw_1",              pure_purify_watch_rw_1,              1},
-    {"purify_watch_rw_2",              pure_purify_watch_rw_2,              1},
-    {"purify_watch_rw_4",              pure_purify_watch_rw_4,              1},
-    {"purify_watch_rw_8",              pure_purify_watch_rw_8,              1},
-    {"purify_watch_n",                 pure_purify_watch_n,                 1},
-    {"purify_watch_info",              pure_purify_watch_info,              1},
-    {"purify_watch_remove",            pure_purify_watch_remove,            1},
-    {"purify_watch_remove_all",        pure_purify_watch_remove_all,        1},
-    {"purify_describe",                pure_purify_describe,                1},
-    {"purify_what_colors",             pure_purify_what_colors,             1},
-    {"purify_is_running",              pure_purify_is_running,              1},
-    {"purify_assert_is_readable",      pure_purify_assert_is_readable,      1},
-    {"purify_assert_is_writable",      pure_purify_assert_is_writable,      1},
+    {"purify_printf_with_call_chain",  pure_purify_printf_with_call_chain,  METH_VARARGS},
+    {"purify_set_pool_id",             pure_purify_set_pool_id,             METH_VARARGS},
+    {"purify_get_pool_id",             pure_purify_get_pool_id,             METH_VARARGS},
+    {"purify_set_user_data",           pure_purify_set_user_data,           METH_VARARGS},
+    {"purify_get_user_data",           pure_purify_get_user_data,           METH_VARARGS},
+    {"purify_map_pool",                pure_purify_map_pool,                METH_VARARGS},
+    {"purify_map_pool_id",             pure_purify_map_pool_id,             METH_VARARGS},
+    {"purify_new_messages",            pure_purify_new_messages,            METH_VARARGS},
+    {"purify_all_messages",            pure_purify_all_messages,            METH_VARARGS},
+    {"purify_clear_messages",          pure_purify_clear_messages,          METH_VARARGS},
+    {"purify_clear_new_messages",      pure_purify_clear_new_messages,      METH_VARARGS},
+    {"purify_start_batch",             pure_purify_start_batch,             METH_VARARGS},
+    {"purify_start_batch_show_first",  pure_purify_start_batch_show_first,  METH_VARARGS},
+    {"purify_stop_batch",              pure_purify_stop_batch,              METH_VARARGS},
+    {"purify_name_thread",             pure_purify_name_thread,             METH_VARARGS},
+    {"purify_watch",                   pure_purify_watch,                   METH_VARARGS},
+    {"purify_watch_1",                 pure_purify_watch_1,                 METH_VARARGS},
+    {"purify_watch_2",                 pure_purify_watch_2,                 METH_VARARGS},
+    {"purify_watch_4",                 pure_purify_watch_4,                 METH_VARARGS},
+    {"purify_watch_8",                 pure_purify_watch_8,                 METH_VARARGS},
+    {"purify_watch_w_1",               pure_purify_watch_w_1,               METH_VARARGS},
+    {"purify_watch_w_2",               pure_purify_watch_w_2,               METH_VARARGS},
+    {"purify_watch_w_4",               pure_purify_watch_w_4,               METH_VARARGS},
+    {"purify_watch_w_8",               pure_purify_watch_w_8,               METH_VARARGS},
+    {"purify_watch_r_1",               pure_purify_watch_r_1,               METH_VARARGS},
+    {"purify_watch_r_2",               pure_purify_watch_r_2,               METH_VARARGS},
+    {"purify_watch_r_4",               pure_purify_watch_r_4,               METH_VARARGS},
+    {"purify_watch_r_8",               pure_purify_watch_r_8,               METH_VARARGS},
+    {"purify_watch_rw_1",              pure_purify_watch_rw_1,              METH_VARARGS},
+    {"purify_watch_rw_2",              pure_purify_watch_rw_2,              METH_VARARGS},
+    {"purify_watch_rw_4",              pure_purify_watch_rw_4,              METH_VARARGS},
+    {"purify_watch_rw_8",              pure_purify_watch_rw_8,              METH_VARARGS},
+    {"purify_watch_n",                 pure_purify_watch_n,                 METH_VARARGS},
+    {"purify_watch_info",              pure_purify_watch_info,              METH_VARARGS},
+    {"purify_watch_remove",            pure_purify_watch_remove,            METH_VARARGS},
+    {"purify_watch_remove_all",        pure_purify_watch_remove_all,        METH_VARARGS},
+    {"purify_describe",                pure_purify_describe,                METH_VARARGS},
+    {"purify_what_colors",             pure_purify_what_colors,             METH_VARARGS},
+    {"purify_is_running",              pure_purify_is_running,              METH_VARARGS},
+    {"purify_assert_is_readable",      pure_purify_assert_is_readable,      METH_VARARGS},
+    {"purify_assert_is_writable",      pure_purify_assert_is_writable,      METH_VARARGS},
 #if HAS_PURIFY_EXIT
     /* I wish I could include this, but I can't.  See the notes at the
      * top of the file.
      */
-    {"purify_exit",                    pure_purify_exit,                    1},
+    {"purify_exit",                    pure_purify_exit,                    METH_VARARGS},
 #endif /* HAS_PURIFY_EXIT */
 #endif /* PURIFY_H */
 #ifdef QUANTIFY_H
-    {"quantify_is_running",            pure_quantify_is_running,            1},
-    {"quantify_help",                  pure_quantify_help,                  1},
-    {"quantify_print_recording_state", pure_quantify_print_recording_state, 1},
-    {"quantify_start_recording_data",  pure_quantify_start_recording_data,  1},
-    {"quantify_stop_recording_data",   pure_quantify_stop_recording_data,   1},
-    {"quantify_is_recording_data",     pure_quantify_is_recording_data,  1},
+    {"quantify_is_running",            pure_quantify_is_running,            METH_VARARGS},
+    {"quantify_help",                  pure_quantify_help,                  METH_VARARGS},
+    {"quantify_print_recording_state", pure_quantify_print_recording_state, METH_VARARGS},
+    {"quantify_start_recording_data",  pure_quantify_start_recording_data,  METH_VARARGS},
+    {"quantify_stop_recording_data",   pure_quantify_stop_recording_data,   METH_VARARGS},
+    {"quantify_is_recording_data",     pure_quantify_is_recording_data,  METH_VARARGS},
     {"quantify_start_recording_system_calls",
-     pure_quantify_start_recording_system_calls, 1},
+     pure_quantify_start_recording_system_calls, METH_VARARGS},
     {"quantify_stop_recording_system_calls",
-     pure_quantify_stop_recording_system_calls, 1},
+     pure_quantify_stop_recording_system_calls, METH_VARARGS},
     {"quantify_is_recording_system_calls",
-     pure_quantify_is_recording_system_calls, 1},
+     pure_quantify_is_recording_system_calls, METH_VARARGS},
     {"quantify_start_recording_system_call",
-     pure_quantify_start_recording_system_call, 1},
+     pure_quantify_start_recording_system_call, METH_VARARGS},
     {"quantify_stop_recording_system_call",
-     pure_quantify_stop_recording_system_call, 1},
+     pure_quantify_stop_recording_system_call, METH_VARARGS},
     {"quantify_is_recording_system_call",
-     pure_quantify_is_recording_system_call, 1},
+     pure_quantify_is_recording_system_call, METH_VARARGS},
     {"quantify_start_recording_dynamic_library_data",
-     pure_quantify_start_recording_dynamic_library_data, 1},
+     pure_quantify_start_recording_dynamic_library_data, METH_VARARGS},
     {"quantify_stop_recording_dynamic_library_data",
-     pure_quantify_stop_recording_dynamic_library_data, 1},
+     pure_quantify_stop_recording_dynamic_library_data, METH_VARARGS},
     {"quantify_is_recording_dynamic_library_data",
-     pure_quantify_is_recording_dynamic_library_data, 1},
+     pure_quantify_is_recording_dynamic_library_data, METH_VARARGS},
     {"quantify_start_recording_register_window_traps",
-     pure_quantify_start_recording_register_window_traps, 1},
+     pure_quantify_start_recording_register_window_traps, METH_VARARGS},
     {"quantify_stop_recording_register_window_traps",
-     pure_quantify_stop_recording_register_window_traps, 1},
+     pure_quantify_stop_recording_register_window_traps, METH_VARARGS},
     {"quantify_is_recording_register_window_traps",
-     pure_quantify_is_recording_register_window_traps, 1},
+     pure_quantify_is_recording_register_window_traps, METH_VARARGS},
     {"quantify_disable_recording_data",
-     pure_quantify_disable_recording_data, 1},
-    {"quantify_clear_data",        pure_quantify_clear_data,        1},
-    {"quantify_save_data",         pure_quantify_save_data,         1},
-    {"quantify_save_data_to_file", pure_quantify_save_data_to_file, 1},
-    {"quantify_add_annotation",    pure_quantify_add_annotation,    1},
+     pure_quantify_disable_recording_data, METH_VARARGS},
+    {"quantify_clear_data",        pure_quantify_clear_data,        METH_VARARGS},
+    {"quantify_save_data",         pure_quantify_save_data,         METH_VARARGS},
+    {"quantify_save_data_to_file", pure_quantify_save_data_to_file, METH_VARARGS},
+    {"quantify_add_annotation",    pure_quantify_add_annotation,    METH_VARARGS},
 #endif /* QUANTIFY_H */
     {NULL,  NULL}                           /* sentinel */
 };
index c3711e6839e519c232698fa47cf584dc5682c075..e65258d4704ee78bf79827837ab2aece742aa97d 100644 (file)
@@ -246,9 +246,9 @@ regobj_group(regexobject *re, PyObject *args)
 
 
 static struct PyMethodDef reg_methods[] = {
-       {"match",       (PyCFunction)regobj_match, 1},
-       {"search",      (PyCFunction)regobj_search, 1},
-       {"group",       (PyCFunction)regobj_group, 1},
+       {"match",       (PyCFunction)regobj_match, METH_VARARGS},
+       {"search",      (PyCFunction)regobj_search, METH_VARARGS},
+       {"group",       (PyCFunction)regobj_group, METH_VARARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
@@ -638,12 +638,12 @@ regex_get_syntax(PyObject *self, PyObject *args)
 
 
 static struct PyMethodDef regex_global_methods[] = {
-       {"compile",     regex_compile, 1},
-       {"symcomp",     regex_symcomp, 1},
-       {"match",       regex_match, 0},
-       {"search",      regex_search, 0},
-       {"set_syntax",  regex_set_syntax, 0},
-       {"get_syntax",  regex_get_syntax, 0},
+       {"compile",     regex_compile, METH_VARARGS},
+       {"symcomp",     regex_symcomp, METH_VARARGS},
+       {"match",       regex_match, METH_OLDARGS},
+       {"search",      regex_search, METH_OLDARGS},
+       {"set_syntax",  regex_set_syntax, METH_OLDARGS},
+       {"get_syntax",  regex_get_syntax, METH_OLDARGS},
        {NULL,          NULL}                /* sentinel */
 };
 
index 45474be267596faf466b371ea99561c76181fad6..1924104c777b7778c16ddc1f19cc2bb6560e712a 100644 (file)
@@ -147,10 +147,10 @@ resource_getpagesize(PyObject *self, PyObject *args)
 
 static struct PyMethodDef
 resource_methods[] = {
-       {"getrusage",    resource_getrusage,   1},
-       {"getrlimit",    resource_getrlimit,   1},
-       {"setrlimit",    resource_setrlimit,   1},
-       {"getpagesize",  resource_getpagesize, 1},
+       {"getrusage",    resource_getrusage,   METH_VARARGS},
+       {"getrlimit",    resource_getrlimit,   METH_VARARGS},
+       {"setrlimit",    resource_setrlimit,   METH_VARARGS},
+       {"getpagesize",  resource_getpagesize, METH_VARARGS},
        {NULL, NULL}                         /* sentinel */
 };
 
index 304dbd6489fb1eed86ee8a675a3e29386a934437..828577f8b1c9638d6309601db71ab0d776a1ca42 100644 (file)
@@ -743,10 +743,10 @@ ttob(PyObject *self, PyObject *args)
 
 static PyMethodDef
 rgbimg_methods[] = {
-       {"sizeofimage",    sizeofimage},
-       {"longimagedata",  longimagedata},
-       {"longstoimage",   longstoimage},
-       {"ttob",           ttob},
+       {"sizeofimage",    sizeofimage, METH_OLDARGS},
+       {"longimagedata",  longimagedata, METH_OLDARGS},
+       {"longstoimage",   longstoimage, METH_OLDARGS},
+       {"ttob",           ttob, METH_OLDARGS},
        {NULL,             NULL}             /* sentinel */
 };
 
index 7c1131c9ca8f8ec2495344937ef1eeac5918837c..23ded46e02c20fbc04903cc371d368ffa0f23fdb 100644 (file)
@@ -558,11 +558,11 @@ rotorobj_setkey(Rotorobj *self, PyObject *args)
 
 static struct PyMethodDef
 rotorobj_methods[] = {
-       {"encrypt",     (PyCFunction)rotorobj_encrypt},
-       {"encryptmore", (PyCFunction)rotorobj_encrypt_more},
-       {"decrypt",     (PyCFunction)rotorobj_decrypt},
-       {"decryptmore", (PyCFunction)rotorobj_decrypt_more},
-       {"setkey",      (PyCFunction)rotorobj_setkey, 1},
+       {"encrypt",     (PyCFunction)rotorobj_encrypt, METH_OLDARGS},
+       {"encryptmore", (PyCFunction)rotorobj_encrypt_more, METH_OLDARGS},
+       {"decrypt",     (PyCFunction)rotorobj_decrypt, METH_OLDARGS},
+       {"decryptmore", (PyCFunction)rotorobj_decrypt_more, METH_OLDARGS},
+       {"setkey",      (PyCFunction)rotorobj_setkey, METH_VARARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
index 7ec43d3fb6b573c2fcfb9f227e7ad492e5e8baee..4c96f0441ef961e2813fcc9b55b78108470b8e48 100644 (file)
@@ -42,8 +42,8 @@ sgi__getpty(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef sgi_methods[] = {
-       {"nap",         sgi_nap},
-       {"_getpty",     sgi__getpty},
+       {"nap",         sgi_nap, METH_OLDARGS},
+       {"_getpty",     sgi__getpty, METH_OLDARGS},
        {NULL,          NULL}           /* sentinel */
 };
 
index 25912a4e6bdbf6e6e46566efa29d8c351a91415c..031d60f89e59d84c42c3d7adc8e9c66d4bba0325 100644 (file)
@@ -2863,9 +2863,9 @@ static char PySSL_SSLread_doc[] =
 Read up to len bytes from the SSL socket.";
 
 static PyMethodDef PySSLMethods[] = {
-       {"write", (PyCFunction)PySSL_SSLwrite, 1,
+       {"write", (PyCFunction)PySSL_SSLwrite, METH_VARARGS,
                  PySSL_SSLwrite_doc},
-       {"read", (PyCFunction)PySSL_SSLread, 1,
+       {"read", (PyCFunction)PySSL_SSLread, METH_VARARGS,
                  PySSL_SSLread_doc},
        {"server", (PyCFunction)PySSL_server, METH_NOARGS},
        {"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS},
index 78be8427d54337d8575dd5204940e0d32cb6d5e6..514cab6b74789b2523dd108658a546a4503328ec 100644 (file)
@@ -322,20 +322,20 @@ sad_fileno(sadobject *self, PyObject *args)
 
 
 static PyMethodDef sad_methods[] = {
-        { "read",      (PyCFunction)sad_read },
-        { "write",     (PyCFunction)sad_write },
-        { "ibufcount", (PyCFunction)sad_ibufcount },
-        { "obufcount", (PyCFunction)sad_obufcount },
+        { "read",      (PyCFunction)sad_read, METH_OLDARGS },
+        { "write",     (PyCFunction)sad_write, METH_OLDARGS },
+        { "ibufcount", (PyCFunction)sad_ibufcount, METH_OLDARGS },
+        { "obufcount", (PyCFunction)sad_obufcount, METH_OLDARGS },
 #define CTL_METHODS 4
-        { "getinfo",   (PyCFunction)sad_getinfo },
-        { "setinfo",   (PyCFunction)sad_setinfo },
-        { "drain",     (PyCFunction)sad_drain },
-        { "flush",     (PyCFunction)sad_flush },
+        { "getinfo",   (PyCFunction)sad_getinfo, METH_OLDARGS },
+        { "setinfo",   (PyCFunction)sad_setinfo, METH_OLDARGS },
+        { "drain",     (PyCFunction)sad_drain, METH_OLDARGS },
+        { "flush",     (PyCFunction)sad_flush, METH_OLDARGS },
 #ifdef SOLARIS
-       { "getdev",     (PyCFunction)sad_getdev },
+       { "getdev",     (PyCFunction)sad_getdev, METH_OLDARGS },
 #endif
-        { "close",     (PyCFunction)sad_close },
-       { "fileno",     (PyCFunction)sad_fileno },
+        { "close",     (PyCFunction)sad_close, METH_OLDARGS },
+       { "fileno",     (PyCFunction)sad_fileno, METH_OLDARGS },
        {NULL,          NULL}           /* sentinel */
 };
 
@@ -465,7 +465,7 @@ sadopen(PyObject *self, PyObject *args)
 }
     
 static PyMethodDef sunaudiodev_methods[] = {
-    { "open", sadopen },
+    { "open", sadopen, METH_OLDARGS },
     { 0, 0 },
 };
 
index 1e254ad8bbe94b25ed8cc33557dfc465afc5c1de..d66f1cfe41b182f8df1cd0ec6b765059ab180d2a 100644 (file)
@@ -255,19 +255,19 @@ svc_FindVisibleRegion(captureobject *self, PyObject *args)
 }
 
 static PyMethodDef capture_methods[] = {
-       {"YUVtoRGB",            (PyCFunction)svc_YUVtoRGB},
-       {"RGB8toRGB32",         (PyCFunction)svc_RGB8toRGB32},
-       {"InterleaveFields",    (PyCFunction)svc_InterleaveFields},
-       {"UnlockCaptureData",   (PyCFunction)svc_UnlockCaptureData},
-       {"FindVisibleRegion",   (PyCFunction)svc_FindVisibleRegion},
-       {"GetFields",           (PyCFunction)svc_GetFields},
-       {"YUVtoYUV422DC",       (PyCFunction)svc_YUVtoYUV422DC},
-       {"YUVtoYUV422DC_quarter",(PyCFunction)svc_YUVtoYUV422DC_quarter},
-       {"YUVtoYUV422DC_sixteenth",(PyCFunction)svc_YUVtoYUV422DC_sixteenth},
+       {"YUVtoRGB",            (PyCFunction)svc_YUVtoRGB, METH_OLDARGS},
+       {"RGB8toRGB32",         (PyCFunction)svc_RGB8toRGB32, METH_OLDARGS},
+       {"InterleaveFields",    (PyCFunction)svc_InterleaveFields, METH_OLDARGS},
+       {"UnlockCaptureData",   (PyCFunction)svc_UnlockCaptureData, METH_OLDARGS},
+       {"FindVisibleRegion",   (PyCFunction)svc_FindVisibleRegion, METH_OLDARGS},
+       {"GetFields",           (PyCFunction)svc_GetFields, METH_OLDARGS},
+       {"YUVtoYUV422DC",       (PyCFunction)svc_YUVtoYUV422DC, METH_OLDARGS},
+       {"YUVtoYUV422DC_quarter",(PyCFunction)svc_YUVtoYUV422DC_quarter, METH_OLDARGS},
+       {"YUVtoYUV422DC_sixteenth",(PyCFunction)svc_YUVtoYUV422DC_sixteenth, METH_OLDARGS},
 #ifdef USE_GL
-       {"lrectwrite",          (PyCFunction)svc_lrectwrite},
+       {"lrectwrite",          (PyCFunction)svc_lrectwrite, METH_OLDARGS},
 #endif
-       {"writefile",           (PyCFunction)svc_writefile},
+       {"writefile",           (PyCFunction)svc_writefile, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -810,25 +810,25 @@ sv_SetParam(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef svideo_methods[] = {
-       {"BindGLWindow",        (PyCFunction)sv_BindGLWindow},
-       {"EndContinuousCapture",(PyCFunction)sv_EndContinuousCapture},
-       {"IsVideoDisplayed",    (PyCFunction)sv_IsVideoDisplayed},
-       {"OutputOffset",        (PyCFunction)sv_OutputOffset},
-       {"PutFrame",            (PyCFunction)sv_PutFrame},
-       {"QuerySize",           (PyCFunction)sv_QuerySize},
-       {"SetSize",             (PyCFunction)sv_SetSize},
-       {"SetStdDefaults",      (PyCFunction)sv_SetStdDefaults},
-       {"UseExclusive",        (PyCFunction)sv_UseExclusive},
-       {"WindowOffset",        (PyCFunction)sv_WindowOffset},
-       {"InitContinuousCapture",(PyCFunction)sv_InitContinuousCapture},
-       {"CaptureBurst",        (PyCFunction)sv_CaptureBurst},
-       {"CaptureOneFrame",     (PyCFunction)sv_CaptureOneFrame},
-       {"GetCaptureData",      (PyCFunction)sv_GetCaptureData},
-       {"CloseVideo",          (PyCFunction)sv_CloseVideo},
-       {"LoadMap",             (PyCFunction)sv_LoadMap},
-       {"GetParam",            (PyCFunction)sv_GetParam},
-       {"GetParamRange",       (PyCFunction)sv_GetParamRange},
-       {"SetParam",            (PyCFunction)sv_SetParam},
+       {"BindGLWindow",        (PyCFunction)sv_BindGLWindow, METH_OLDARGS},
+       {"EndContinuousCapture",(PyCFunction)sv_EndContinuousCapture, METH_OLDARGS},
+       {"IsVideoDisplayed",    (PyCFunction)sv_IsVideoDisplayed, METH_OLDARGS},
+       {"OutputOffset",        (PyCFunction)sv_OutputOffset, METH_OLDARGS},
+       {"PutFrame",            (PyCFunction)sv_PutFrame, METH_OLDARGS},
+       {"QuerySize",           (PyCFunction)sv_QuerySize, METH_OLDARGS},
+       {"SetSize",             (PyCFunction)sv_SetSize, METH_OLDARGS},
+       {"SetStdDefaults",      (PyCFunction)sv_SetStdDefaults, METH_OLDARGS},
+       {"UseExclusive",        (PyCFunction)sv_UseExclusive, METH_OLDARGS},
+       {"WindowOffset",        (PyCFunction)sv_WindowOffset, METH_OLDARGS},
+       {"InitContinuousCapture",(PyCFunction)sv_InitContinuousCapture, METH_OLDARGS},
+       {"CaptureBurst",        (PyCFunction)sv_CaptureBurst, METH_OLDARGS},
+       {"CaptureOneFrame",     (PyCFunction)sv_CaptureOneFrame, METH_OLDARGS},
+       {"GetCaptureData",      (PyCFunction)sv_GetCaptureData, METH_OLDARGS},
+       {"CloseVideo",          (PyCFunction)sv_CloseVideo, METH_OLDARGS},
+       {"LoadMap",             (PyCFunction)sv_LoadMap, METH_OLDARGS},
+       {"GetParam",            (PyCFunction)sv_GetParam, METH_OLDARGS},
+       {"GetParamRange",       (PyCFunction)sv_GetParamRange, METH_OLDARGS},
+       {"SetParam",            (PyCFunction)sv_SetParam, METH_OLDARGS},
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -943,10 +943,10 @@ sv_OpenVideo(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef sv_methods[] = {
-       {"InterleaveFields",    (PyCFunction)sv_InterleaveFields},
-       {"RGB8toRGB32",         (PyCFunction)sv_RGB8toRGB32},
-       {"YUVtoRGB",            (PyCFunction)sv_YUVtoRGB},
-       {"OpenVideo",           (PyCFunction)sv_OpenVideo},
+       {"InterleaveFields",    (PyCFunction)sv_InterleaveFields, METH_OLDARGS},
+       {"RGB8toRGB32",         (PyCFunction)sv_RGB8toRGB32, METH_OLDARGS},
+       {"YUVtoRGB",            (PyCFunction)sv_YUVtoRGB, METH_OLDARGS},
+       {"OpenVideo",           (PyCFunction)sv_OpenVideo, METH_OLDARGS},
        {NULL,                  NULL}   /* Sentinel */
 };
 
index 184469679b8f743b90f794214be8ff49640d13ee..4f1d5cf5fc3e1d604e58160b171d4140bf5d6c0f 100644 (file)
@@ -60,11 +60,11 @@ micro(PyObject *self, PyObject *args)
 
 
 static PyMethodDef timing_methods[] = {
-       {"start",   start_timing},
-       {"finish",  finish_timing},
-       {"seconds", seconds},
-       {"milli",   milli},
-       {"micro",   micro},
+       {"start",   start_timing, METH_OLDARGS},
+       {"finish",  finish_timing, METH_OLDARGS},
+       {"seconds", seconds, METH_OLDARGS},
+       {"milli",   milli, METH_OLDARGS},
+       {"micro",   micro, METH_OLDARGS},
        {NULL,      NULL}
 };