Commit 43b936d0 authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #477750: Use METH_ constants in Modules.

parent c0e1671c
...@@ -667,37 +667,37 @@ mbcs_encode(PyObject *self, ...@@ -667,37 +667,37 @@ mbcs_encode(PyObject *self,
/* --- Module API --------------------------------------------------------- */ /* --- Module API --------------------------------------------------------- */
static PyMethodDef _codecs_functions[] = { static PyMethodDef _codecs_functions[] = {
{"register", codecregister, 1}, {"register", codecregister, METH_VARARGS},
{"lookup", codeclookup, 1}, {"lookup", codeclookup, METH_VARARGS},
#ifdef Py_USING_UNICODE #ifdef Py_USING_UNICODE
{"utf_8_encode", utf_8_encode, 1}, {"utf_8_encode", utf_8_encode, METH_VARARGS},
{"utf_8_decode", utf_8_decode, 1}, {"utf_8_decode", utf_8_decode, METH_VARARGS},
{"utf_7_encode", utf_7_encode, 1}, {"utf_7_encode", utf_7_encode, METH_VARARGS},
{"utf_7_decode", utf_7_decode, 1}, {"utf_7_decode", utf_7_decode, METH_VARARGS},
{"utf_16_encode", utf_16_encode, 1}, {"utf_16_encode", utf_16_encode, METH_VARARGS},
{"utf_16_le_encode", utf_16_le_encode, 1}, {"utf_16_le_encode", utf_16_le_encode, METH_VARARGS},
{"utf_16_be_encode", utf_16_be_encode, 1}, {"utf_16_be_encode", utf_16_be_encode, METH_VARARGS},
{"utf_16_decode", utf_16_decode, 1}, {"utf_16_decode", utf_16_decode, METH_VARARGS},
{"utf_16_le_decode", utf_16_le_decode, 1}, {"utf_16_le_decode", utf_16_le_decode, METH_VARARGS},
{"utf_16_be_decode", utf_16_be_decode, 1}, {"utf_16_be_decode", utf_16_be_decode, METH_VARARGS},
{"utf_16_ex_decode", utf_16_ex_decode, 1}, {"utf_16_ex_decode", utf_16_ex_decode, METH_VARARGS},
{"unicode_escape_encode", unicode_escape_encode, 1}, {"unicode_escape_encode", unicode_escape_encode, METH_VARARGS},
{"unicode_escape_decode", unicode_escape_decode, 1}, {"unicode_escape_decode", unicode_escape_decode, METH_VARARGS},
{"unicode_internal_encode", unicode_internal_encode, 1}, {"unicode_internal_encode", unicode_internal_encode, METH_VARARGS},
{"unicode_internal_decode", unicode_internal_decode, 1}, {"unicode_internal_decode", unicode_internal_decode, METH_VARARGS},
{"raw_unicode_escape_encode", raw_unicode_escape_encode, 1}, {"raw_unicode_escape_encode", raw_unicode_escape_encode, METH_VARARGS},
{"raw_unicode_escape_decode", raw_unicode_escape_decode, 1}, {"raw_unicode_escape_decode", raw_unicode_escape_decode, METH_VARARGS},
{"latin_1_encode", latin_1_encode, 1}, {"latin_1_encode", latin_1_encode, METH_VARARGS},
{"latin_1_decode", latin_1_decode, 1}, {"latin_1_decode", latin_1_decode, METH_VARARGS},
{"ascii_encode", ascii_encode, 1}, {"ascii_encode", ascii_encode, METH_VARARGS},
{"ascii_decode", ascii_decode, 1}, {"ascii_decode", ascii_decode, METH_VARARGS},
{"charmap_encode", charmap_encode, 1}, {"charmap_encode", charmap_encode, METH_VARARGS},
{"charmap_decode", charmap_decode, 1}, {"charmap_decode", charmap_decode, METH_VARARGS},
{"readbuffer_encode", readbuffer_encode, 1}, {"readbuffer_encode", readbuffer_encode, METH_VARARGS},
{"charbuffer_encode", charbuffer_encode, 1}, {"charbuffer_encode", charbuffer_encode, METH_VARARGS},
#if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T) #if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
{"mbcs_encode", mbcs_encode, 1}, {"mbcs_encode", mbcs_encode, METH_VARARGS},
{"mbcs_decode", mbcs_decode, 1}, {"mbcs_decode", mbcs_decode, METH_VARARGS},
#endif #endif
#endif /* Py_USING_UNICODE */ #endif /* Py_USING_UNICODE */
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
......
...@@ -1763,40 +1763,40 @@ Tkapp_InterpAddr(PyObject *self, PyObject *args) ...@@ -1763,40 +1763,40 @@ Tkapp_InterpAddr(PyObject *self, PyObject *args)
static PyMethodDef Tkapp_methods[] = static PyMethodDef Tkapp_methods[] =
{ {
{"call", Tkapp_Call, 0}, {"call", Tkapp_Call, METH_OLDARGS},
{"globalcall", Tkapp_GlobalCall, 0}, {"globalcall", Tkapp_GlobalCall, METH_OLDARGS},
{"eval", Tkapp_Eval, 1}, {"eval", Tkapp_Eval, METH_VARARGS},
{"globaleval", Tkapp_GlobalEval, 1}, {"globaleval", Tkapp_GlobalEval, METH_VARARGS},
{"evalfile", Tkapp_EvalFile, 1}, {"evalfile", Tkapp_EvalFile, METH_VARARGS},
{"record", Tkapp_Record, 1}, {"record", Tkapp_Record, METH_VARARGS},
{"adderrorinfo", Tkapp_AddErrorInfo, 1}, {"adderrorinfo", Tkapp_AddErrorInfo, METH_VARARGS},
{"setvar", Tkapp_SetVar, 1}, {"setvar", Tkapp_SetVar, METH_VARARGS},
{"globalsetvar", Tkapp_GlobalSetVar, 1}, {"globalsetvar", Tkapp_GlobalSetVar, METH_VARARGS},
{"getvar", Tkapp_GetVar, 1}, {"getvar", Tkapp_GetVar, METH_VARARGS},
{"globalgetvar", Tkapp_GlobalGetVar, 1}, {"globalgetvar", Tkapp_GlobalGetVar, METH_VARARGS},
{"unsetvar", Tkapp_UnsetVar, 1}, {"unsetvar", Tkapp_UnsetVar, METH_VARARGS},
{"globalunsetvar", Tkapp_GlobalUnsetVar, 1}, {"globalunsetvar", Tkapp_GlobalUnsetVar, METH_VARARGS},
{"getint", Tkapp_GetInt, 1}, {"getint", Tkapp_GetInt, METH_VARARGS},
{"getdouble", Tkapp_GetDouble, 1}, {"getdouble", Tkapp_GetDouble, METH_VARARGS},
{"getboolean", Tkapp_GetBoolean, 1}, {"getboolean", Tkapp_GetBoolean, METH_VARARGS},
{"exprstring", Tkapp_ExprString, 1}, {"exprstring", Tkapp_ExprString, METH_VARARGS},
{"exprlong", Tkapp_ExprLong, 1}, {"exprlong", Tkapp_ExprLong, METH_VARARGS},
{"exprdouble", Tkapp_ExprDouble, 1}, {"exprdouble", Tkapp_ExprDouble, METH_VARARGS},
{"exprboolean", Tkapp_ExprBoolean, 1}, {"exprboolean", Tkapp_ExprBoolean, METH_VARARGS},
{"splitlist", Tkapp_SplitList, 1}, {"splitlist", Tkapp_SplitList, METH_VARARGS},
{"split", Tkapp_Split, 1}, {"split", Tkapp_Split, METH_VARARGS},
{"merge", Tkapp_Merge, 0}, {"merge", Tkapp_Merge, METH_OLDARGS},
{"createcommand", Tkapp_CreateCommand, 1}, {"createcommand", Tkapp_CreateCommand, METH_VARARGS},
{"deletecommand", Tkapp_DeleteCommand, 1}, {"deletecommand", Tkapp_DeleteCommand, METH_VARARGS},
#ifdef HAVE_CREATEFILEHANDLER #ifdef HAVE_CREATEFILEHANDLER
{"createfilehandler", Tkapp_CreateFileHandler, 1}, {"createfilehandler", Tkapp_CreateFileHandler, METH_VARARGS},
{"deletefilehandler", Tkapp_DeleteFileHandler, 1}, {"deletefilehandler", Tkapp_DeleteFileHandler, METH_VARARGS},
#endif #endif
{"createtimerhandler", Tkapp_CreateTimerHandler, 1}, {"createtimerhandler", Tkapp_CreateTimerHandler, METH_VARARGS},
{"mainloop", Tkapp_MainLoop, 1}, {"mainloop", Tkapp_MainLoop, METH_VARARGS},
{"dooneevent", Tkapp_DoOneEvent, 1}, {"dooneevent", Tkapp_DoOneEvent, METH_VARARGS},
{"quit", Tkapp_Quit, 1}, {"quit", Tkapp_Quit, METH_VARARGS},
{"interpaddr", Tkapp_InterpAddr, 1}, {"interpaddr", Tkapp_InterpAddr, METH_VARARGS},
{NULL, NULL} {NULL, NULL}
}; };
...@@ -1978,16 +1978,16 @@ Tkinter_Create(PyObject *self, PyObject *args) ...@@ -1978,16 +1978,16 @@ Tkinter_Create(PyObject *self, PyObject *args)
static PyMethodDef moduleMethods[] = static PyMethodDef moduleMethods[] =
{ {
{"_flatten", Tkinter_Flatten, 1}, {"_flatten", Tkinter_Flatten, METH_VARARGS},
{"create", Tkinter_Create, 1}, {"create", Tkinter_Create, METH_VARARGS},
#ifdef HAVE_CREATEFILEHANDLER #ifdef HAVE_CREATEFILEHANDLER
{"createfilehandler", Tkapp_CreateFileHandler, 1}, {"createfilehandler", Tkapp_CreateFileHandler, METH_VARARGS},
{"deletefilehandler", Tkapp_DeleteFileHandler, 1}, {"deletefilehandler", Tkapp_DeleteFileHandler, METH_VARARGS},
#endif #endif
{"createtimerhandler", Tkapp_CreateTimerHandler, 1}, {"createtimerhandler", Tkapp_CreateTimerHandler, METH_VARARGS},
{"mainloop", Tkapp_MainLoop, 1}, {"mainloop", Tkapp_MainLoop, METH_VARARGS},
{"dooneevent", Tkapp_DoOneEvent, 1}, {"dooneevent", Tkapp_DoOneEvent, METH_VARARGS},
{"quit", Tkapp_Quit, 1}, {"quit", Tkapp_Quit, METH_VARARGS},
{NULL, NULL} {NULL, NULL}
}; };
......
...@@ -1343,29 +1343,29 @@ audioop_adpcm2lin(PyObject *self, PyObject *args) ...@@ -1343,29 +1343,29 @@ audioop_adpcm2lin(PyObject *self, PyObject *args)
} }
static PyMethodDef audioop_methods[] = { static PyMethodDef audioop_methods[] = {
{ "max", audioop_max }, { "max", audioop_max, METH_OLDARGS },
{ "minmax", audioop_minmax }, { "minmax", audioop_minmax, METH_OLDARGS },
{ "avg", audioop_avg }, { "avg", audioop_avg, METH_OLDARGS },
{ "maxpp", audioop_maxpp }, { "maxpp", audioop_maxpp, METH_OLDARGS },
{ "avgpp", audioop_avgpp }, { "avgpp", audioop_avgpp, METH_OLDARGS },
{ "rms", audioop_rms }, { "rms", audioop_rms, METH_OLDARGS },
{ "findfit", audioop_findfit }, { "findfit", audioop_findfit, METH_OLDARGS },
{ "findmax", audioop_findmax }, { "findmax", audioop_findmax, METH_OLDARGS },
{ "findfactor", audioop_findfactor }, { "findfactor", audioop_findfactor, METH_OLDARGS },
{ "cross", audioop_cross }, { "cross", audioop_cross, METH_OLDARGS },
{ "mul", audioop_mul }, { "mul", audioop_mul, METH_OLDARGS },
{ "add", audioop_add }, { "add", audioop_add, METH_OLDARGS },
{ "bias", audioop_bias }, { "bias", audioop_bias, METH_OLDARGS },
{ "ulaw2lin", audioop_ulaw2lin }, { "ulaw2lin", audioop_ulaw2lin, METH_OLDARGS },
{ "lin2ulaw", audioop_lin2ulaw }, { "lin2ulaw", audioop_lin2ulaw, METH_OLDARGS },
{ "lin2lin", audioop_lin2lin }, { "lin2lin", audioop_lin2lin, METH_OLDARGS },
{ "adpcm2lin", audioop_adpcm2lin }, { "adpcm2lin", audioop_adpcm2lin, METH_OLDARGS },
{ "lin2adpcm", audioop_lin2adpcm }, { "lin2adpcm", audioop_lin2adpcm, METH_OLDARGS },
{ "tomono", audioop_tomono }, { "tomono", audioop_tomono, METH_OLDARGS },
{ "tostereo", audioop_tostereo }, { "tostereo", audioop_tostereo, METH_OLDARGS },
{ "getsample", audioop_getsample }, { "getsample", audioop_getsample, METH_OLDARGS },
{ "reverse", audioop_reverse }, { "reverse", audioop_reverse, METH_OLDARGS },
{ "ratecv", audioop_ratecv, 1 }, { "ratecv", audioop_ratecv, METH_VARARGS },
{ 0, 0 } { 0, 0 }
}; };
......
...@@ -652,15 +652,15 @@ bsddb_sync(bsddbobject *dp, PyObject *args) ...@@ -652,15 +652,15 @@ bsddb_sync(bsddbobject *dp, PyObject *args)
return PyInt_FromLong(status = 0); return PyInt_FromLong(status = 0);
} }
static PyMethodDef bsddb_methods[] = { static PyMethodDef bsddb_methods[] = {
{"close", (PyCFunction)bsddb_close}, {"close", (PyCFunction)bsddb_close, METH_OLDARGS},
{"keys", (PyCFunction)bsddb_keys}, {"keys", (PyCFunction)bsddb_keys, METH_OLDARGS},
{"has_key", (PyCFunction)bsddb_has_key}, {"has_key", (PyCFunction)bsddb_has_key, METH_OLDARGS},
{"set_location", (PyCFunction)bsddb_set_location}, {"set_location", (PyCFunction)bsddb_set_location, METH_OLDARGS},
{"next", (PyCFunction)bsddb_next}, {"next", (PyCFunction)bsddb_next, METH_OLDARGS},
{"previous", (PyCFunction)bsddb_previous}, {"previous", (PyCFunction)bsddb_previous, METH_OLDARGS},
{"first", (PyCFunction)bsddb_first}, {"first", (PyCFunction)bsddb_first, METH_OLDARGS},
{"last", (PyCFunction)bsddb_last}, {"last", (PyCFunction)bsddb_last, METH_OLDARGS},
{"sync", (PyCFunction)bsddb_sync}, {"sync", (PyCFunction)bsddb_sync, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -849,9 +849,9 @@ bsdrnopen(PyObject *self, PyObject *args) ...@@ -849,9 +849,9 @@ bsdrnopen(PyObject *self, PyObject *args)
} }
static PyMethodDef bsddbmodule_methods[] = { static PyMethodDef bsddbmodule_methods[] = {
{"hashopen", (PyCFunction)bsdhashopen, 1}, {"hashopen", (PyCFunction)bsdhashopen, METH_VARARGS},
{"btopen", (PyCFunction)bsdbtopen, 1}, {"btopen", (PyCFunction)bsdbtopen, METH_VARARGS},
{"rnopen", (PyCFunction)bsdrnopen, 1}, {"rnopen", (PyCFunction)bsdrnopen, METH_VARARGS},
{0, 0}, {0, 0},
}; };
......
...@@ -353,24 +353,24 @@ CD_togglepause(cdplayerobject *self, PyObject *args) ...@@ -353,24 +353,24 @@ CD_togglepause(cdplayerobject *self, PyObject *args)
} }
static PyMethodDef cdplayer_methods[] = { static PyMethodDef cdplayer_methods[] = {
{"allowremoval", (PyCFunction)CD_allowremoval, 1}, {"allowremoval", (PyCFunction)CD_allowremoval, METH_VARARGS},
{"bestreadsize", (PyCFunction)CD_bestreadsize, 1}, {"bestreadsize", (PyCFunction)CD_bestreadsize, METH_VARARGS},
{"close", (PyCFunction)CD_close, 1}, {"close", (PyCFunction)CD_close, METH_VARARGS},
{"eject", (PyCFunction)CD_eject, 1}, {"eject", (PyCFunction)CD_eject, METH_VARARGS},
{"getstatus", (PyCFunction)CD_getstatus, 1}, {"getstatus", (PyCFunction)CD_getstatus, METH_VARARGS},
{"gettrackinfo", (PyCFunction)CD_gettrackinfo, 1}, {"gettrackinfo", (PyCFunction)CD_gettrackinfo, METH_VARARGS},
{"msftoblock", (PyCFunction)CD_msftoblock, 1}, {"msftoblock", (PyCFunction)CD_msftoblock, METH_VARARGS},
{"play", (PyCFunction)CD_play, 1}, {"play", (PyCFunction)CD_play, METH_VARARGS},
{"playabs", (PyCFunction)CD_playabs, 1}, {"playabs", (PyCFunction)CD_playabs, METH_VARARGS},
{"playtrack", (PyCFunction)CD_playtrack, 1}, {"playtrack", (PyCFunction)CD_playtrack, METH_VARARGS},
{"playtrackabs", (PyCFunction)CD_playtrackabs, 1}, {"playtrackabs", (PyCFunction)CD_playtrackabs, METH_VARARGS},
{"preventremoval", (PyCFunction)CD_preventremoval, 1}, {"preventremoval", (PyCFunction)CD_preventremoval, METH_VARARGS},
{"readda", (PyCFunction)CD_readda, 1}, {"readda", (PyCFunction)CD_readda, METH_VARARGS},
{"seek", (PyCFunction)CD_seek, 1}, {"seek", (PyCFunction)CD_seek, METH_VARARGS},
{"seekblock", (PyCFunction)CD_seekblock, 1}, {"seekblock", (PyCFunction)CD_seekblock, METH_VARARGS},
{"seektrack", (PyCFunction)CD_seektrack, 1}, {"seektrack", (PyCFunction)CD_seektrack, METH_VARARGS},
{"stop", (PyCFunction)CD_stop, 1}, {"stop", (PyCFunction)CD_stop, METH_VARARGS},
{"togglepause", (PyCFunction)CD_togglepause, 1}, {"togglepause", (PyCFunction)CD_togglepause, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -653,13 +653,13 @@ CD_addcallback(cdparserobject *self, PyObject *args) ...@@ -653,13 +653,13 @@ CD_addcallback(cdparserobject *self, PyObject *args)
} }
static PyMethodDef cdparser_methods[] = { static PyMethodDef cdparser_methods[] = {
{"addcallback", (PyCFunction)CD_addcallback, 1}, {"addcallback", (PyCFunction)CD_addcallback, METH_VARARGS},
{"deleteparser", (PyCFunction)CD_deleteparser, 1}, {"deleteparser", (PyCFunction)CD_deleteparser, METH_VARARGS},
{"parseframe", (PyCFunction)CD_parseframe, 1}, {"parseframe", (PyCFunction)CD_parseframe, METH_VARARGS},
{"removecallback", (PyCFunction)CD_removecallback, 1}, {"removecallback", (PyCFunction)CD_removecallback, METH_VARARGS},
{"resetparser", (PyCFunction)CD_resetparser, 1}, {"resetparser", (PyCFunction)CD_resetparser, METH_VARARGS},
/* backward compatibility */ /* backward compatibility */
{"setcallback", (PyCFunction)CD_addcallback, 1}, {"setcallback", (PyCFunction)CD_addcallback, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -749,9 +749,9 @@ CD_msftoframe(PyObject *self, PyObject *args) ...@@ -749,9 +749,9 @@ CD_msftoframe(PyObject *self, PyObject *args)
} }
static PyMethodDef CD_methods[] = { static PyMethodDef CD_methods[] = {
{"open", (PyCFunction)CD_open, 1}, {"open", (PyCFunction)CD_open, METH_VARARGS},
{"createparser", (PyCFunction)CD_createparser, 1}, {"createparser", (PyCFunction)CD_createparser, METH_VARARGS},
{"msftoframe", (PyCFunction)CD_msftoframe, 1}, {"msftoframe", (PyCFunction)CD_msftoframe, METH_VARARGS},
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
......
...@@ -600,37 +600,37 @@ clm_ReadHeader(PyObject *self, PyObject *args) ...@@ -600,37 +600,37 @@ clm_ReadHeader(PyObject *self, PyObject *args)
} }
static PyMethodDef compressor_methods[] = { static PyMethodDef compressor_methods[] = {
{"close", clm_CloseCompressor}, /* alias */ {"close", clm_CloseCompressor, METH_OLDARGS}, /* alias */
{"CloseCompressor", clm_CloseCompressor}, {"CloseCompressor", clm_CloseCompressor, METH_OLDARGS},
{"Compress", clm_Compress}, {"Compress", clm_Compress, METH_OLDARGS},
{"GetDefault", clm_GetDefault}, {"GetDefault", clm_GetDefault, METH_OLDARGS},
{"GetMinMax", clm_GetMinMax}, {"GetMinMax", clm_GetMinMax, METH_OLDARGS},
{"GetName", clm_GetName}, {"GetName", clm_GetName, METH_OLDARGS},
{"GetParam", clm_GetParam}, {"GetParam", clm_GetParam, METH_OLDARGS},
{"GetParamID", clm_GetParamID}, {"GetParamID", clm_GetParamID, METH_OLDARGS},
{"GetParams", clm_GetParams}, {"GetParams", clm_GetParams, METH_OLDARGS},
{"QueryParams", clm_QueryParams}, {"QueryParams", clm_QueryParams, METH_OLDARGS},
{"QuerySchemeFromHandle",clm_QuerySchemeFromHandle}, {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_OLDARGS},
{"SetParam", clm_SetParam}, {"SetParam", clm_SetParam, METH_OLDARGS},
{"SetParams", clm_SetParams}, {"SetParams", clm_SetParams, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
static PyMethodDef decompressor_methods[] = { static PyMethodDef decompressor_methods[] = {
{"close", clm_CloseDecompressor}, /* alias */ {"close", clm_CloseDecompressor, METH_OLDARGS}, /* alias */
{"CloseDecompressor", clm_CloseDecompressor}, {"CloseDecompressor", clm_CloseDecompressor, METH_OLDARGS},
{"Decompress", clm_Decompress}, {"Decompress", clm_Decompress, METH_OLDARGS},
{"GetDefault", clm_GetDefault}, {"GetDefault", clm_GetDefault, METH_OLDARGS},
{"GetMinMax", clm_GetMinMax}, {"GetMinMax", clm_GetMinMax, METH_OLDARGS},
{"GetName", clm_GetName}, {"GetName", clm_GetName, METH_OLDARGS},
{"GetParam", clm_GetParam}, {"GetParam", clm_GetParam, METH_OLDARGS},
{"GetParamID", clm_GetParamID}, {"GetParamID", clm_GetParamID, METH_OLDARGS},
{"GetParams", clm_GetParams}, {"GetParams", clm_GetParams, METH_OLDARGS},
{"ReadHeader", clm_ReadHeader}, {"ReadHeader", clm_ReadHeader, METH_OLDARGS},
{"QueryParams", clm_QueryParams}, {"QueryParams", clm_QueryParams, METH_OLDARGS},
{"QuerySchemeFromHandle",clm_QuerySchemeFromHandle}, {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_OLDARGS},
{"SetParam", clm_SetParam}, {"SetParam", clm_SetParam, METH_OLDARGS},
{"SetParams", clm_SetParams}, {"SetParams", clm_SetParams, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -936,30 +936,30 @@ cvt_type(PyObject *self, PyObject *args) ...@@ -936,30 +936,30 @@ cvt_type(PyObject *self, PyObject *args)
#endif #endif
static PyMethodDef cl_methods[] = { static PyMethodDef cl_methods[] = {
{"CompressImage", cl_CompressImage}, {"CompressImage", cl_CompressImage, METH_OLDARGS},
{"DecompressImage", cl_DecompressImage}, {"DecompressImage", cl_DecompressImage, METH_OLDARGS},
{"GetAlgorithmName", cl_GetAlgorithmName}, {"GetAlgorithmName", cl_GetAlgorithmName, METH_OLDARGS},
{"OpenCompressor", cl_OpenCompressor}, {"OpenCompressor", cl_OpenCompressor, METH_OLDARGS},
{"OpenDecompressor", cl_OpenDecompressor}, {"OpenDecompressor", cl_OpenDecompressor, METH_OLDARGS},
{"QueryAlgorithms", cl_QueryAlgorithms}, {"QueryAlgorithms", cl_QueryAlgorithms, METH_OLDARGS},
{"QueryMaxHeaderSize", cl_QueryMaxHeaderSize}, {"QueryMaxHeaderSize", cl_QueryMaxHeaderSize, METH_OLDARGS},
{"QueryScheme", cl_QueryScheme}, {"QueryScheme", cl_QueryScheme, METH_OLDARGS},
{"QuerySchemeFromName", cl_QuerySchemeFromName}, {"QuerySchemeFromName", cl_QuerySchemeFromName, METH_OLDARGS},
{"SetDefault", cl_SetDefault}, {"SetDefault", cl_SetDefault, METH_OLDARGS},
{"SetMax", cl_SetMax}, {"SetMax", cl_SetMax, METH_OLDARGS},
{"SetMin", cl_SetMin}, {"SetMin", cl_SetMin, METH_OLDARGS},
{"BytesPerSample", cl_BytesPerSample}, {"BytesPerSample", cl_BytesPerSample, METH_OLDARGS},
{"BytesPerPixel", cl_BytesPerPixel}, {"BytesPerPixel", cl_BytesPerPixel, METH_OLDARGS},
{"AudioFormatName", cl_AudioFormatName}, {"AudioFormatName", cl_AudioFormatName, METH_OLDARGS},
{"VideoFormatName", cl_VideoFormatName}, {"VideoFormatName", cl_VideoFormatName, METH_OLDARGS},
{"AlgorithmNumber", cl_AlgorithmNumber}, {"AlgorithmNumber", cl_AlgorithmNumber, METH_OLDARGS},
{"AlgorithmType", cl_AlgorithmType}, {"AlgorithmType", cl_AlgorithmType, METH_OLDARGS},
{"Algorithm", cl_Algorithm}, {"Algorithm", cl_Algorithm, METH_OLDARGS},
{"ParamNumber", cl_ParamNumber}, {"ParamNumber", cl_ParamNumber, METH_OLDARGS},
{"ParamType", cl_ParamType}, {"ParamType", cl_ParamType, METH_OLDARGS},
{"ParamID", cl_ParamID}, {"ParamID", cl_ParamID, METH_OLDARGS},
#ifdef CLDEBUG #ifdef CLDEBUG
{"cvt_type", cvt_type}, {"cvt_type", cvt_type, METH_OLDARGS},
#endif #endif
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
......
...@@ -120,9 +120,9 @@ dl_call(dlobject *xp, PyObject *args) ...@@ -120,9 +120,9 @@ dl_call(dlobject *xp, PyObject *args)
} }
static PyMethodDef dlobject_methods[] = { static PyMethodDef dlobject_methods[] = {
{"call", (PyCFunction)dl_call, 1 /* varargs */}, {"call", (PyCFunction)dl_call, METH_VARARGS},
{"sym", (PyCFunction)dl_sym}, {"sym", (PyCFunction)dl_sym, METH_OLDARGS},
{"close", (PyCFunction)dl_close}, {"close", (PyCFunction)dl_close, METH_OLDARGS},
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
...@@ -187,7 +187,7 @@ dl_open(PyObject *self, PyObject *args) ...@@ -187,7 +187,7 @@ dl_open(PyObject *self, PyObject *args)
} }
static PyMethodDef dl_methods[] = { static PyMethodDef dl_methods[] = {
{"open", dl_open}, {"open", dl_open, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -252,18 +252,18 @@ generic_set_object_shortcut(genericobject *g, PyObject *args) ...@@ -252,18 +252,18 @@ generic_set_object_shortcut(genericobject *g, PyObject *args)
} }
static PyMethodDef generic_methods[] = { static PyMethodDef generic_methods[] = {
{"set_call_back", (PyCFunction)generic_set_call_back}, {"set_call_back", (PyCFunction)generic_set_call_back, METH_OLDARGS},
{"delete_object", (PyCFunction)generic_delete_object}, {"delete_object", (PyCFunction)generic_delete_object, METH_OLDARGS},
{"show_object", (PyCFunction)generic_show_object}, {"show_object", (PyCFunction)generic_show_object, METH_OLDARGS},
{"hide_object", (PyCFunction)generic_hide_object}, {"hide_object", (PyCFunction)generic_hide_object, METH_OLDARGS},
{"redraw_object", (PyCFunction)generic_redraw_object}, {"redraw_object", (PyCFunction)generic_redraw_object, METH_OLDARGS},
#ifdef OBSOLETE_FORMS_CALLS #ifdef OBSOLETE_FORMS_CALLS
{"freeze_object", (PyCFunction)generic_freeze_object}, {"freeze_object", (PyCFunction)generic_freeze_object, METH_OLDARGS},
{"unfreeze_object", (PyCFunction)generic_unfreeze_object}, {"unfreeze_object", (PyCFunction)generic_unfreeze_object, METH_OLDARGS},
#endif #endif
{"activate_object", (PyCFunction)generic_activate_object}, {"activate_object", (PyCFunction)generic_activate_object, METH_OLDARGS},
{"deactivate_object", (PyCFunction)generic_deactivate_object}, {"deactivate_object", (PyCFunction)generic_deactivate_object, METH_OLDARGS},
{"set_object_shortcut", (PyCFunction)generic_set_object_shortcut}, {"set_object_shortcut", (PyCFunction)generic_set_object_shortcut, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -2081,44 +2081,44 @@ forms_get_filename(PyObject *f, PyObject *args) ...@@ -2081,44 +2081,44 @@ forms_get_filename(PyObject *f, PyObject *args)
static PyMethodDef forms_methods[] = { static PyMethodDef forms_methods[] = {
/* adm */ /* adm */
{"make_form", forms_make_form}, {"make_form", forms_make_form, METH_OLDARGS},
{"activate_all_forms", forms_activate_all_forms}, {"activate_all_forms", forms_activate_all_forms, METH_OLDARGS},
{"deactivate_all_forms",forms_deactivate_all_forms}, {"deactivate_all_forms",forms_deactivate_all_forms, METH_OLDARGS},
/* gl support wrappers */ /* gl support wrappers */
{"qdevice", forms_qdevice}, {"qdevice", forms_qdevice, METH_OLDARGS},
{"unqdevice", forms_unqdevice}, {"unqdevice", forms_unqdevice, METH_OLDARGS},
{"isqueued", forms_isqueued}, {"isqueued", forms_isqueued, METH_OLDARGS},
{"qtest", forms_qtest}, {"qtest", forms_qtest, METH_OLDARGS},
{"qread", forms_qread}, {"qread", forms_qread, METH_OLDARGS},
/* {"blkqread", forms_blkqread}, */ /* {"blkqread", forms_blkqread, METH_OLDARGS}, */
{"qreset", forms_qreset}, {"qreset", forms_qreset, METH_OLDARGS},
{"qenter", forms_qenter}, {"qenter", forms_qenter, METH_OLDARGS},
{"get_mouse", forms_get_mouse}, {"get_mouse", forms_get_mouse, METH_OLDARGS},
{"tie", forms_tie}, {"tie", forms_tie, METH_OLDARGS},
/* {"new_events", forms_new_events}, */ /* {"new_events", forms_new_events, METH_OLDARGS}, */
{"color", forms_color}, {"color", forms_color, METH_OLDARGS},
{"mapcolor", forms_mapcolor}, {"mapcolor", forms_mapcolor, METH_OLDARGS},
{"getmcolor", forms_getmcolor}, {"getmcolor", forms_getmcolor, METH_OLDARGS},
/* interaction */ /* interaction */
{"do_forms", forms_do_forms}, {"do_forms", forms_do_forms, METH_OLDARGS},
{"do_only_forms", forms_do_only_forms}, {"do_only_forms", forms_do_only_forms, METH_OLDARGS},
{"check_forms", forms_check_forms}, {"check_forms", forms_check_forms, METH_OLDARGS},
{"check_only_forms", forms_check_only_forms}, {"check_only_forms", forms_check_only_forms, METH_OLDARGS},
{"set_event_call_back", forms_set_event_call_back}, {"set_event_call_back", forms_set_event_call_back, METH_OLDARGS},
/* goodies */ /* goodies */
{"show_message", forms_show_message}, {"show_message", forms_show_message, METH_OLDARGS},
{"show_question", forms_show_question}, {"show_question", forms_show_question, METH_OLDARGS},
{"show_choice", forms_show_choice}, {"show_choice", forms_show_choice, METH_OLDARGS},
{"show_input", forms_show_input}, {"show_input", forms_show_input, METH_OLDARGS},
{"show_file_selector", forms_file_selector}, {"show_file_selector", forms_file_selector, METH_OLDARGS},
{"file_selector", forms_file_selector}, /* BW compat */ {"file_selector", forms_file_selector, METH_OLDARGS}, /* BW compat */
{"get_directory", forms_get_directory}, {"get_directory", forms_get_directory, METH_OLDARGS},
{"get_pattern", forms_get_pattern}, {"get_pattern", forms_get_pattern, METH_OLDARGS},
{"get_filename", forms_get_filename}, {"get_filename", forms_get_filename, METH_OLDARGS},
{"set_graphics_mode", forms_set_graphics_mode}, {"set_graphics_mode", forms_set_graphics_mode, METH_OLDARGS},
{"get_rgbmode", forms_get_rgbmode}, {"get_rgbmode", forms_get_rgbmode, METH_OLDARGS},
{"show_errors", forms_show_errors}, {"show_errors", forms_show_errors, METH_OLDARGS},
{"set_font_name", forms_set_font_name}, {"set_font_name", forms_set_font_name, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -126,15 +126,15 @@ fh_getstrwidth(fhobject *self, PyObject *args) ...@@ -126,15 +126,15 @@ fh_getstrwidth(fhobject *self, PyObject *args)
} }
static PyMethodDef fh_methods[] = { static PyMethodDef fh_methods[] = {
{"scalefont", (PyCFunction)fh_scalefont}, {"scalefont", (PyCFunction)fh_scalefont, METH_OLDARGS},
{"setfont", (PyCFunction)fh_setfont}, {"setfont", (PyCFunction)fh_setfont, METH_OLDARGS},
{"getfontname", (PyCFunction)fh_getfontname}, {"getfontname", (PyCFunction)fh_getfontname, METH_OLDARGS},
{"getcomment", (PyCFunction)fh_getcomment}, {"getcomment", (PyCFunction)fh_getcomment, METH_OLDARGS},
{"getfontinfo", (PyCFunction)fh_getfontinfo}, {"getfontinfo", (PyCFunction)fh_getfontinfo, METH_OLDARGS},
#if 0 #if 0
{"getwholemetrics", (PyCFunction)fh_getwholemetrics}, {"getwholemetrics", (PyCFunction)fh_getwholemetrics, METH_OLDARGS},
#endif #endif
{"getstrwidth", (PyCFunction)fh_getstrwidth}, {"getstrwidth", (PyCFunction)fh_getstrwidth, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -258,12 +258,12 @@ fm_fontpath(PyObject *self, PyObject *args) ...@@ -258,12 +258,12 @@ fm_fontpath(PyObject *self, PyObject *args)
} }
static PyMethodDef fm_methods[] = { static PyMethodDef fm_methods[] = {
{"init", fm_init}, {"init", fm_init, METH_OLDARGS},
{"findfont", fm_findfont}, {"findfont", fm_findfont, METH_OLDARGS},
{"enumerate", fm_enumerate}, {"enumerate", fm_enumerate, METH_OLDARGS},
{"prstr", fm_prstr}, {"prstr", fm_prstr, METH_OLDARGS},
{"setpath", fm_setpath}, {"setpath", fm_setpath, METH_OLDARGS},
{"fontpath", fm_fontpath}, {"fontpath", fm_fontpath, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -91,8 +91,8 @@ static PyObject *turnon_sigfpe (PyObject *self,PyObject *args); ...@@ -91,8 +91,8 @@ static PyObject *turnon_sigfpe (PyObject *self,PyObject *args);
static PyObject *turnoff_sigfpe (PyObject *self,PyObject *args); static PyObject *turnoff_sigfpe (PyObject *self,PyObject *args);
static PyMethodDef fpectl_methods[] = { static PyMethodDef fpectl_methods[] = {
{"turnon_sigfpe", (PyCFunction) turnon_sigfpe, 1}, {"turnon_sigfpe", (PyCFunction) turnon_sigfpe, METH_VARARGS},
{"turnoff_sigfpe", (PyCFunction) turnoff_sigfpe, 1}, {"turnoff_sigfpe", (PyCFunction) turnoff_sigfpe, METH_VARARGS},
{0,0} {0,0}
}; };
......
...@@ -54,7 +54,7 @@ static double nest3(double); ...@@ -54,7 +54,7 @@ static double nest3(double);
static void printerr(double); static void printerr(double);
static PyMethodDef fpetest_methods[] = { static PyMethodDef fpetest_methods[] = {
{"test", (PyCFunction) test, 1}, {"test", (PyCFunction) test, METH_VARARGS},
{0,0} {0,0}
}; };
......
...@@ -677,21 +677,21 @@ imageop_mul(object *self, object *args) ...@@ -677,21 +677,21 @@ imageop_mul(object *self, object *args)
*/ */
static PyMethodDef imageop_methods[] = { static PyMethodDef imageop_methods[] = {
{ "crop", imageop_crop }, { "crop", imageop_crop, METH_OLDARGS },
{ "scale", imageop_scale }, { "scale", imageop_scale, METH_OLDARGS },
{ "grey2mono", imageop_grey2mono }, { "grey2mono", imageop_grey2mono, METH_OLDARGS },
{ "grey2grey2", imageop_grey2grey2 }, { "grey2grey2", imageop_grey2grey2, METH_OLDARGS },
{ "grey2grey4", imageop_grey2grey4 }, { "grey2grey4", imageop_grey2grey4, METH_OLDARGS },
{ "dither2mono", imageop_dither2mono }, { "dither2mono", imageop_dither2mono, METH_OLDARGS },
{ "dither2grey2", imageop_dither2grey2 }, { "dither2grey2", imageop_dither2grey2, METH_OLDARGS },
{ "mono2grey", imageop_mono2grey }, { "mono2grey", imageop_mono2grey, METH_OLDARGS },
{ "grey22grey", imageop_grey22grey }, { "grey22grey", imageop_grey22grey, METH_OLDARGS },
{ "grey42grey", imageop_grey42grey }, { "grey42grey", imageop_grey42grey, METH_OLDARGS },
{ "tovideo", imageop_tovideo }, { "tovideo", imageop_tovideo, METH_OLDARGS },
{ "rgb2rgb8", imageop_rgb2rgb8 }, { "rgb2rgb8", imageop_rgb2rgb8, METH_OLDARGS },
{ "rgb82rgb", imageop_rgb82rgb }, { "rgb82rgb", imageop_rgb82rgb, METH_OLDARGS },
{ "rgb2grey", imageop_rgb2grey }, { "rgb2grey", imageop_rgb2grey, METH_OLDARGS },
{ "grey2rgb", imageop_grey2rgb }, { "grey2rgb", imageop_grey2rgb, METH_OLDARGS },
{ 0, 0 } { 0, 0 }
}; };
......
...@@ -490,11 +490,11 @@ imgfile_write(PyObject *self, PyObject *args) ...@@ -490,11 +490,11 @@ imgfile_write(PyObject *self, PyObject *args)
static PyMethodDef imgfile_methods[] = { static PyMethodDef imgfile_methods[] = {
{ "getsizes", imgfile_getsizes }, { "getsizes", imgfile_getsizes, METH_OLDARGS },
{ "read", imgfile_read }, { "read", imgfile_read, METH_OLDARGS },
{ "readscaled", imgfile_readscaled, 1}, { "readscaled", imgfile_readscaled, METH_VARARGS},
{ "write", imgfile_write }, { "write", imgfile_write, METH_OLDARGS },
{ "ttob", imgfile_ttob }, { "ttob", imgfile_ttob, METH_OLDARGS },
{ NULL, NULL } /* Sentinel */ { NULL, NULL } /* Sentinel */
}; };
......
...@@ -558,19 +558,19 @@ mmap_move_method(mmap_object *self, PyObject *args) ...@@ -558,19 +558,19 @@ mmap_move_method(mmap_object *self, PyObject *args)
} }
static struct PyMethodDef mmap_object_methods[] = { static struct PyMethodDef mmap_object_methods[] = {
{"close", (PyCFunction) mmap_close_method, 1}, {"close", (PyCFunction) mmap_close_method, METH_VARARGS},
{"find", (PyCFunction) mmap_find_method, 1}, {"find", (PyCFunction) mmap_find_method, METH_VARARGS},
{"flush", (PyCFunction) mmap_flush_method, 1}, {"flush", (PyCFunction) mmap_flush_method, METH_VARARGS},
{"move", (PyCFunction) mmap_move_method, 1}, {"move", (PyCFunction) mmap_move_method, METH_VARARGS},
{"read", (PyCFunction) mmap_read_method, 1}, {"read", (PyCFunction) mmap_read_method, METH_VARARGS},
{"read_byte", (PyCFunction) mmap_read_byte_method, 1}, {"read_byte", (PyCFunction) mmap_read_byte_method, METH_VARARGS},
{"readline", (PyCFunction) mmap_read_line_method, 1}, {"readline", (PyCFunction) mmap_read_line_method, METH_VARARGS},
{"resize", (PyCFunction) mmap_resize_method, 1}, {"resize", (PyCFunction) mmap_resize_method, METH_VARARGS},
{"seek", (PyCFunction) mmap_seek_method, 1}, {"seek", (PyCFunction) mmap_seek_method, METH_VARARGS},
{"size", (PyCFunction) mmap_size_method, 1}, {"size", (PyCFunction) mmap_size_method, METH_VARARGS},
{"tell", (PyCFunction) mmap_tell_method, 1}, {"tell", (PyCFunction) mmap_tell_method, METH_VARARGS},
{"write", (PyCFunction) mmap_write_method, 1}, {"write", (PyCFunction) mmap_write_method, METH_VARARGS},
{"write_byte", (PyCFunction) mmap_write_byte_method, 1}, {"write_byte", (PyCFunction) mmap_write_byte_method, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -1608,17 +1608,17 @@ static PyTypeObject MPZtype = { ...@@ -1608,17 +1608,17 @@ static PyTypeObject MPZtype = {
static PyMethodDef mpz_functions[] = { static PyMethodDef mpz_functions[] = {
#if 0 #if 0
{initialiser_name, MPZ_mpz}, {initialiser_name, MPZ_mpz, METH_OLDARGS},
#else /* 0 */ #else /* 0 */
/* until guido ``fixes'' struct PyMethodDef */ /* until guido ``fixes'' struct PyMethodDef */
{(char *)initialiser_name, MPZ_mpz}, {(char *)initialiser_name, MPZ_mpz, METH_OLDARGS},
#endif /* 0 else */ #endif /* 0 else */
{"powm", MPZ_powm}, {"powm", MPZ_powm, METH_OLDARGS},
{"gcd", MPZ_gcd}, {"gcd", MPZ_gcd, METH_OLDARGS},
{"gcdext", MPZ_gcdext}, {"gcdext", MPZ_gcdext, METH_OLDARGS},
{"sqrt", MPZ_sqrt}, {"sqrt", MPZ_sqrt, METH_OLDARGS},
{"sqrtrem", MPZ_sqrtrem}, {"sqrtrem", MPZ_sqrtrem, METH_OLDARGS},
{"divm", MPZ_divm}, {"divm", MPZ_divm, METH_OLDARGS},
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
......
...@@ -364,9 +364,9 @@ nis_maps (PyObject *self, PyObject *args) ...@@ -364,9 +364,9 @@ nis_maps (PyObject *self, PyObject *args)
} }
static PyMethodDef nis_methods[] = { static PyMethodDef nis_methods[] = {
{"match", nis_match}, {"match", nis_match, METH_OLDARGS},
{"cat", nis_cat}, {"cat", nis_cat, METH_OLDARGS},
{"maps", nis_maps}, {"maps", nis_maps, METH_OLDARGS},
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
......
...@@ -114,7 +114,7 @@ PyPcre_exec(PcreObject *self, PyObject *args) ...@@ -114,7 +114,7 @@ PyPcre_exec(PcreObject *self, PyObject *args)
} }
static PyMethodDef Pcre_methods[] = { static PyMethodDef Pcre_methods[] = {
{"match", (PyCFunction)PyPcre_exec, 1}, {"match", (PyCFunction)PyPcre_exec, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -582,8 +582,8 @@ PyPcre_expand(PyObject *self, PyObject *args) ...@@ -582,8 +582,8 @@ PyPcre_expand(PyObject *self, PyObject *args)
/* List of functions defined in the module */ /* List of functions defined in the module */
static PyMethodDef pcre_methods[] = { static PyMethodDef pcre_methods[] = {
{"pcre_compile", PyPcre_compile, 1}, {"pcre_compile", PyPcre_compile, METH_VARARGS},
{"pcre_expand", PyPcre_expand, 1}, {"pcre_expand", PyPcre_expand, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
This diff is collapsed.
...@@ -246,9 +246,9 @@ regobj_group(regexobject *re, PyObject *args) ...@@ -246,9 +246,9 @@ regobj_group(regexobject *re, PyObject *args)
static struct PyMethodDef reg_methods[] = { static struct PyMethodDef reg_methods[] = {
{"match", (PyCFunction)regobj_match, 1}, {"match", (PyCFunction)regobj_match, METH_VARARGS},
{"search", (PyCFunction)regobj_search, 1}, {"search", (PyCFunction)regobj_search, METH_VARARGS},
{"group", (PyCFunction)regobj_group, 1}, {"group", (PyCFunction)regobj_group, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -638,12 +638,12 @@ regex_get_syntax(PyObject *self, PyObject *args) ...@@ -638,12 +638,12 @@ regex_get_syntax(PyObject *self, PyObject *args)
static struct PyMethodDef regex_global_methods[] = { static struct PyMethodDef regex_global_methods[] = {
{"compile", regex_compile, 1}, {"compile", regex_compile, METH_VARARGS},
{"symcomp", regex_symcomp, 1}, {"symcomp", regex_symcomp, METH_VARARGS},
{"match", regex_match, 0}, {"match", regex_match, METH_OLDARGS},
{"search", regex_search, 0}, {"search", regex_search, METH_OLDARGS},
{"set_syntax", regex_set_syntax, 0}, {"set_syntax", regex_set_syntax, METH_OLDARGS},
{"get_syntax", regex_get_syntax, 0}, {"get_syntax", regex_get_syntax, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -147,10 +147,10 @@ resource_getpagesize(PyObject *self, PyObject *args) ...@@ -147,10 +147,10 @@ resource_getpagesize(PyObject *self, PyObject *args)
static struct PyMethodDef static struct PyMethodDef
resource_methods[] = { resource_methods[] = {
{"getrusage", resource_getrusage, 1}, {"getrusage", resource_getrusage, METH_VARARGS},
{"getrlimit", resource_getrlimit, 1}, {"getrlimit", resource_getrlimit, METH_VARARGS},
{"setrlimit", resource_setrlimit, 1}, {"setrlimit", resource_setrlimit, METH_VARARGS},
{"getpagesize", resource_getpagesize, 1}, {"getpagesize", resource_getpagesize, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -743,10 +743,10 @@ ttob(PyObject *self, PyObject *args) ...@@ -743,10 +743,10 @@ ttob(PyObject *self, PyObject *args)
static PyMethodDef static PyMethodDef
rgbimg_methods[] = { rgbimg_methods[] = {
{"sizeofimage", sizeofimage}, {"sizeofimage", sizeofimage, METH_OLDARGS},
{"longimagedata", longimagedata}, {"longimagedata", longimagedata, METH_OLDARGS},
{"longstoimage", longstoimage}, {"longstoimage", longstoimage, METH_OLDARGS},
{"ttob", ttob}, {"ttob", ttob, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -558,11 +558,11 @@ rotorobj_setkey(Rotorobj *self, PyObject *args) ...@@ -558,11 +558,11 @@ rotorobj_setkey(Rotorobj *self, PyObject *args)
static struct PyMethodDef static struct PyMethodDef
rotorobj_methods[] = { rotorobj_methods[] = {
{"encrypt", (PyCFunction)rotorobj_encrypt}, {"encrypt", (PyCFunction)rotorobj_encrypt, METH_OLDARGS},
{"encryptmore", (PyCFunction)rotorobj_encrypt_more}, {"encryptmore", (PyCFunction)rotorobj_encrypt_more, METH_OLDARGS},
{"decrypt", (PyCFunction)rotorobj_decrypt}, {"decrypt", (PyCFunction)rotorobj_decrypt, METH_OLDARGS},
{"decryptmore", (PyCFunction)rotorobj_decrypt_more}, {"decryptmore", (PyCFunction)rotorobj_decrypt_more, METH_OLDARGS},
{"setkey", (PyCFunction)rotorobj_setkey, 1}, {"setkey", (PyCFunction)rotorobj_setkey, METH_VARARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -42,8 +42,8 @@ sgi__getpty(PyObject *self, PyObject *args) ...@@ -42,8 +42,8 @@ sgi__getpty(PyObject *self, PyObject *args)
} }
static PyMethodDef sgi_methods[] = { static PyMethodDef sgi_methods[] = {
{"nap", sgi_nap}, {"nap", sgi_nap, METH_OLDARGS},
{"_getpty", sgi__getpty}, {"_getpty", sgi__getpty, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
......
...@@ -2863,9 +2863,9 @@ static char PySSL_SSLread_doc[] = ...@@ -2863,9 +2863,9 @@ static char PySSL_SSLread_doc[] =
Read up to len bytes from the SSL socket."; Read up to len bytes from the SSL socket.";
static PyMethodDef PySSLMethods[] = { static PyMethodDef PySSLMethods[] = {
{"write", (PyCFunction)PySSL_SSLwrite, 1, {"write", (PyCFunction)PySSL_SSLwrite, METH_VARARGS,
PySSL_SSLwrite_doc}, PySSL_SSLwrite_doc},
{"read", (PyCFunction)PySSL_SSLread, 1, {"read", (PyCFunction)PySSL_SSLread, METH_VARARGS,
PySSL_SSLread_doc}, PySSL_SSLread_doc},
{"server", (PyCFunction)PySSL_server, METH_NOARGS}, {"server", (PyCFunction)PySSL_server, METH_NOARGS},
{"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS}, {"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS},
......
...@@ -322,20 +322,20 @@ sad_fileno(sadobject *self, PyObject *args) ...@@ -322,20 +322,20 @@ sad_fileno(sadobject *self, PyObject *args)
static PyMethodDef sad_methods[] = { static PyMethodDef sad_methods[] = {
{ "read", (PyCFunction)sad_read }, { "read", (PyCFunction)sad_read, METH_OLDARGS },
{ "write", (PyCFunction)sad_write }, { "write", (PyCFunction)sad_write, METH_OLDARGS },
{ "ibufcount", (PyCFunction)sad_ibufcount }, { "ibufcount", (PyCFunction)sad_ibufcount, METH_OLDARGS },
{ "obufcount", (PyCFunction)sad_obufcount }, { "obufcount", (PyCFunction)sad_obufcount, METH_OLDARGS },
#define CTL_METHODS 4 #define CTL_METHODS 4
{ "getinfo", (PyCFunction)sad_getinfo }, { "getinfo", (PyCFunction)sad_getinfo, METH_OLDARGS },
{ "setinfo", (PyCFunction)sad_setinfo }, { "setinfo", (PyCFunction)sad_setinfo, METH_OLDARGS },
{ "drain", (PyCFunction)sad_drain }, { "drain", (PyCFunction)sad_drain, METH_OLDARGS },
{ "flush", (PyCFunction)sad_flush }, { "flush", (PyCFunction)sad_flush, METH_OLDARGS },
#ifdef SOLARIS #ifdef SOLARIS
{ "getdev", (PyCFunction)sad_getdev }, { "getdev", (PyCFunction)sad_getdev, METH_OLDARGS },
#endif #endif
{ "close", (PyCFunction)sad_close }, { "close", (PyCFunction)sad_close, METH_OLDARGS },
{ "fileno", (PyCFunction)sad_fileno }, { "fileno", (PyCFunction)sad_fileno, METH_OLDARGS },
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -465,7 +465,7 @@ sadopen(PyObject *self, PyObject *args) ...@@ -465,7 +465,7 @@ sadopen(PyObject *self, PyObject *args)
} }
static PyMethodDef sunaudiodev_methods[] = { static PyMethodDef sunaudiodev_methods[] = {
{ "open", sadopen }, { "open", sadopen, METH_OLDARGS },
{ 0, 0 }, { 0, 0 },
}; };
......
...@@ -255,19 +255,19 @@ svc_FindVisibleRegion(captureobject *self, PyObject *args) ...@@ -255,19 +255,19 @@ svc_FindVisibleRegion(captureobject *self, PyObject *args)
} }
static PyMethodDef capture_methods[] = { static PyMethodDef capture_methods[] = {
{"YUVtoRGB", (PyCFunction)svc_YUVtoRGB}, {"YUVtoRGB", (PyCFunction)svc_YUVtoRGB, METH_OLDARGS},
{"RGB8toRGB32", (PyCFunction)svc_RGB8toRGB32}, {"RGB8toRGB32", (PyCFunction)svc_RGB8toRGB32, METH_OLDARGS},
{"InterleaveFields", (PyCFunction)svc_InterleaveFields}, {"InterleaveFields", (PyCFunction)svc_InterleaveFields, METH_OLDARGS},
{"UnlockCaptureData", (PyCFunction)svc_UnlockCaptureData}, {"UnlockCaptureData", (PyCFunction)svc_UnlockCaptureData, METH_OLDARGS},
{"FindVisibleRegion", (PyCFunction)svc_FindVisibleRegion}, {"FindVisibleRegion", (PyCFunction)svc_FindVisibleRegion, METH_OLDARGS},
{"GetFields", (PyCFunction)svc_GetFields}, {"GetFields", (PyCFunction)svc_GetFields, METH_OLDARGS},
{"YUVtoYUV422DC", (PyCFunction)svc_YUVtoYUV422DC}, {"YUVtoYUV422DC", (PyCFunction)svc_YUVtoYUV422DC, METH_OLDARGS},
{"YUVtoYUV422DC_quarter",(PyCFunction)svc_YUVtoYUV422DC_quarter}, {"YUVtoYUV422DC_quarter",(PyCFunction)svc_YUVtoYUV422DC_quarter, METH_OLDARGS},
{"YUVtoYUV422DC_sixteenth",(PyCFunction)svc_YUVtoYUV422DC_sixteenth}, {"YUVtoYUV422DC_sixteenth",(PyCFunction)svc_YUVtoYUV422DC_sixteenth, METH_OLDARGS},
#ifdef USE_GL #ifdef USE_GL
{"lrectwrite", (PyCFunction)svc_lrectwrite}, {"lrectwrite", (PyCFunction)svc_lrectwrite, METH_OLDARGS},
#endif #endif
{"writefile", (PyCFunction)svc_writefile}, {"writefile", (PyCFunction)svc_writefile, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -810,25 +810,25 @@ sv_SetParam(PyObject *self, PyObject *args) ...@@ -810,25 +810,25 @@ sv_SetParam(PyObject *self, PyObject *args)
} }
static PyMethodDef svideo_methods[] = { static PyMethodDef svideo_methods[] = {
{"BindGLWindow", (PyCFunction)sv_BindGLWindow}, {"BindGLWindow", (PyCFunction)sv_BindGLWindow, METH_OLDARGS},
{"EndContinuousCapture",(PyCFunction)sv_EndContinuousCapture}, {"EndContinuousCapture",(PyCFunction)sv_EndContinuousCapture, METH_OLDARGS},
{"IsVideoDisplayed", (PyCFunction)sv_IsVideoDisplayed}, {"IsVideoDisplayed", (PyCFunction)sv_IsVideoDisplayed, METH_OLDARGS},
{"OutputOffset", (PyCFunction)sv_OutputOffset}, {"OutputOffset", (PyCFunction)sv_OutputOffset, METH_OLDARGS},
{"PutFrame", (PyCFunction)sv_PutFrame}, {"PutFrame", (PyCFunction)sv_PutFrame, METH_OLDARGS},
{"QuerySize", (PyCFunction)sv_QuerySize}, {"QuerySize", (PyCFunction)sv_QuerySize, METH_OLDARGS},
{"SetSize", (PyCFunction)sv_SetSize}, {"SetSize", (PyCFunction)sv_SetSize, METH_OLDARGS},
{"SetStdDefaults", (PyCFunction)sv_SetStdDefaults}, {"SetStdDefaults", (PyCFunction)sv_SetStdDefaults, METH_OLDARGS},
{"UseExclusive", (PyCFunction)sv_UseExclusive}, {"UseExclusive", (PyCFunction)sv_UseExclusive, METH_OLDARGS},
{"WindowOffset", (PyCFunction)sv_WindowOffset}, {"WindowOffset", (PyCFunction)sv_WindowOffset, METH_OLDARGS},
{"InitContinuousCapture",(PyCFunction)sv_InitContinuousCapture}, {"InitContinuousCapture",(PyCFunction)sv_InitContinuousCapture, METH_OLDARGS},
{"CaptureBurst", (PyCFunction)sv_CaptureBurst}, {"CaptureBurst", (PyCFunction)sv_CaptureBurst, METH_OLDARGS},
{"CaptureOneFrame", (PyCFunction)sv_CaptureOneFrame}, {"CaptureOneFrame", (PyCFunction)sv_CaptureOneFrame, METH_OLDARGS},
{"GetCaptureData", (PyCFunction)sv_GetCaptureData}, {"GetCaptureData", (PyCFunction)sv_GetCaptureData, METH_OLDARGS},
{"CloseVideo", (PyCFunction)sv_CloseVideo}, {"CloseVideo", (PyCFunction)sv_CloseVideo, METH_OLDARGS},
{"LoadMap", (PyCFunction)sv_LoadMap}, {"LoadMap", (PyCFunction)sv_LoadMap, METH_OLDARGS},
{"GetParam", (PyCFunction)sv_GetParam}, {"GetParam", (PyCFunction)sv_GetParam, METH_OLDARGS},
{"GetParamRange", (PyCFunction)sv_GetParamRange}, {"GetParamRange", (PyCFunction)sv_GetParamRange, METH_OLDARGS},
{"SetParam", (PyCFunction)sv_SetParam}, {"SetParam", (PyCFunction)sv_SetParam, METH_OLDARGS},
{NULL, NULL} /* sentinel */ {NULL, NULL} /* sentinel */
}; };
...@@ -943,10 +943,10 @@ sv_OpenVideo(PyObject *self, PyObject *args) ...@@ -943,10 +943,10 @@ sv_OpenVideo(PyObject *self, PyObject *args)
} }
static PyMethodDef sv_methods[] = { static PyMethodDef sv_methods[] = {
{"InterleaveFields", (PyCFunction)sv_InterleaveFields}, {"InterleaveFields", (PyCFunction)sv_InterleaveFields, METH_OLDARGS},
{"RGB8toRGB32", (PyCFunction)sv_RGB8toRGB32}, {"RGB8toRGB32", (PyCFunction)sv_RGB8toRGB32, METH_OLDARGS},
{"YUVtoRGB", (PyCFunction)sv_YUVtoRGB}, {"YUVtoRGB", (PyCFunction)sv_YUVtoRGB, METH_OLDARGS},
{"OpenVideo", (PyCFunction)sv_OpenVideo}, {"OpenVideo", (PyCFunction)sv_OpenVideo, METH_OLDARGS},
{NULL, NULL} /* Sentinel */ {NULL, NULL} /* Sentinel */
}; };
......
...@@ -60,11 +60,11 @@ micro(PyObject *self, PyObject *args) ...@@ -60,11 +60,11 @@ micro(PyObject *self, PyObject *args)
static PyMethodDef timing_methods[] = { static PyMethodDef timing_methods[] = {
{"start", start_timing}, {"start", start_timing, METH_OLDARGS},
{"finish", finish_timing}, {"finish", finish_timing, METH_OLDARGS},
{"seconds", seconds}, {"seconds", seconds, METH_OLDARGS},
{"milli", milli}, {"milli", milli, METH_OLDARGS},
{"micro", micro}, {"micro", micro, METH_OLDARGS},
{NULL, NULL} {NULL, NULL}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment