]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use METH_VARARGS instead of numeric constant 1 in method def. tables
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 3 Aug 2000 02:06:16 +0000 (02:06 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 3 Aug 2000 02:06:16 +0000 (02:06 +0000)
12 files changed:
Modules/_localemodule.c
Modules/binascii.c
Modules/cStringIO.c
Modules/cmathmodule.c
Modules/md5module.c
Modules/newmodule.c
Modules/readline.c
Modules/socketmodule.c
Modules/soundex.c
Modules/stropmodule.c
Modules/threadmodule.c
Modules/timemodule.c

index 4362ffd3b524cc3c852265505ad3d6f475d824ab..0ea95e4f4d5a2ae30f0ca3bd3f89dd23e8aa61eb 100644 (file)
@@ -389,10 +389,14 @@ PyLocale_getdefaultlocale(PyObject* self, PyObject* args)
 #endif
 
 static struct PyMethodDef PyLocale_Methods[] = {
-  {"setlocale", (PyCFunction) PyLocale_setlocale, 1, setlocale__doc__},
-  {"localeconv", (PyCFunction) PyLocale_localeconv, 0, localeconv__doc__},
-  {"strcoll", (PyCFunction) PyLocale_strcoll, 1, strcoll__doc__},
-  {"strxfrm", (PyCFunction) PyLocale_strxfrm, 1, strxfrm__doc__},
+  {"setlocale", (PyCFunction) PyLocale_setlocale, 
+   METH_VARARGS, setlocale__doc__},
+  {"localeconv", (PyCFunction) PyLocale_localeconv, 
+   0, localeconv__doc__},
+  {"strcoll", (PyCFunction) PyLocale_strcoll, 
+   METH_VARARGS, strcoll__doc__},
+  {"strxfrm", (PyCFunction) PyLocale_strxfrm, 
+   METH_VARARGS, strxfrm__doc__},
 #if defined(MS_WIN32) || defined(macintosh)
   {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0},
 #endif
index 5c9944ac5e1217c3041347ab5a75261f9be26d6c..50f8b76044b5e46f3a90670338c3db6d242e8124 100644 (file)
@@ -877,20 +877,27 @@ binascii_crc32(PyObject *self, PyObject *args)
 /* List of functions defined in the module */
 
 static struct PyMethodDef binascii_module_methods[] = {
-       {"a2b_uu",              binascii_a2b_uu,        1,      doc_a2b_uu},
-       {"b2a_uu",              binascii_b2a_uu,        1,      doc_b2a_uu},
-       {"a2b_base64",          binascii_a2b_base64,    1,
+       {"a2b_uu",              binascii_a2b_uu,        
+        METH_VARARGS,  doc_a2b_uu},
+       {"b2a_uu",              binascii_b2a_uu,        
+        METH_VARARGS,  doc_b2a_uu},
+       {"a2b_base64",          binascii_a2b_base64,    
+        METH_VARARGS,
         doc_a2b_base64},
-       {"b2a_base64",          binascii_b2a_base64,    1,
-        doc_b2a_base64},
-       {"a2b_hqx",             binascii_a2b_hqx,       1,      doc_a2b_hqx},
-       {"b2a_hqx",             binascii_b2a_hqx,       1,      doc_b2a_hqx},
-       {"rlecode_hqx",         binascii_rlecode_hqx,   1,
-        doc_rlecode_hqx},
-       {"rledecode_hqx",       binascii_rledecode_hqx, 1,
-        doc_rledecode_hqx},
-       {"crc_hqx",             binascii_crc_hqx,       1,      doc_crc_hqx},
-       {"crc32",               binascii_crc32,         1,      doc_crc32},
+       {"b2a_base64",          binascii_b2a_base64,    
+        METH_VARARGS, doc_b2a_base64},
+       {"a2b_hqx",             binascii_a2b_hqx,       
+        METH_VARARGS, doc_a2b_hqx},
+       {"b2a_hqx",             binascii_b2a_hqx,       
+        METH_VARARGS, doc_b2a_hqx},
+       {"rlecode_hqx",         binascii_rlecode_hqx,   
+        METH_VARARGS, doc_rlecode_hqx},
+       {"rledecode_hqx",       binascii_rledecode_hqx, 
+        METH_VARARGS, doc_rledecode_hqx},
+       {"crc_hqx",             binascii_crc_hqx,       
+        METH_VARARGS,  doc_crc_hqx},
+       {"crc32",               binascii_crc32,         
+        METH_VARARGS, doc_crc32},
        {NULL,                  NULL}           /* sentinel */
 };
 
index 5be59f47846ea4fe40d7ade0fe673014b6e6d4a9..749ebcb4d90506aca7c001e6ac4b21cc0c84201a 100644 (file)
@@ -617,7 +617,8 @@ IO_StringIO(PyObject *self, PyObject *args) {
 /* List of methods defined in the module */
 
 static struct PyMethodDef IO_methods[] = {
-  {"StringIO", (PyCFunction)IO_StringIO,       1,      IO_StringIO__doc__},
+  {"StringIO", (PyCFunction)IO_StringIO,       
+   METH_VARARGS,       IO_StringIO__doc__},
   {NULL,               NULL}           /* sentinel */
 };
 
index 97819838b3f9b61ac3da15e8bd8d6eb5494435da..69eaf1287014f3b2a90a0186de5909d9d3127f41 100644 (file)
@@ -372,22 +372,38 @@ functions for complex numbers.";
 
 
 static PyMethodDef cmath_methods[] = {
-       {"acos", cmath_acos, 1, c_acos_doc},
-       {"acosh", cmath_acosh, 1, c_acosh_doc},
-       {"asin", cmath_asin, 1, c_asin_doc},
-       {"asinh", cmath_asinh, 1, c_asinh_doc},
-       {"atan", cmath_atan, 1, c_atan_doc},
-       {"atanh", cmath_atanh, 1, c_atanh_doc},
-       {"cos", cmath_cos, 1, c_cos_doc},
-       {"cosh", cmath_cosh, 1, c_cosh_doc},
-       {"exp", cmath_exp, 1, c_exp_doc},
-       {"log", cmath_log, 1, c_log_doc},
-       {"log10", cmath_log10, 1, c_log10_doc},
-       {"sin", cmath_sin, 1, c_sin_doc},
-       {"sinh", cmath_sinh, 1, c_sinh_doc},
-       {"sqrt", cmath_sqrt, 1, c_sqrt_doc},
-       {"tan", cmath_tan, 1, c_tan_doc},
-       {"tanh", cmath_tanh, 1, c_tanh_doc},
+       {"acos", cmath_acos, 
+        METH_VARARGS, c_acos_doc},
+       {"acosh", cmath_acosh, 
+        METH_VARARGS, c_acosh_doc},
+       {"asin", cmath_asin, 
+        METH_VARARGS, c_asin_doc},
+       {"asinh", cmath_asinh, 
+        METH_VARARGS, c_asinh_doc},
+       {"atan", cmath_atan, 
+        METH_VARARGS, c_atan_doc},
+       {"atanh", cmath_atanh, 
+        METH_VARARGS, c_atanh_doc},
+       {"cos", cmath_cos, 
+        METH_VARARGS, c_cos_doc},
+       {"cosh", cmath_cosh, 
+        METH_VARARGS, c_cosh_doc},
+       {"exp", cmath_exp, 
+        METH_VARARGS, c_exp_doc},
+       {"log", cmath_log, 
+        METH_VARARGS, c_log_doc},
+       {"log10", cmath_log10, 
+        METH_VARARGS, c_log10_doc},
+       {"sin", cmath_sin, 
+        METH_VARARGS, c_sin_doc},
+       {"sinh", cmath_sinh, 
+        METH_VARARGS, c_sinh_doc},
+       {"sqrt", cmath_sqrt, 
+        METH_VARARGS, c_sqrt_doc},
+       {"tan", cmath_tan, 
+        METH_VARARGS, c_tan_doc},
+       {"tanh", cmath_tanh, 
+        METH_VARARGS, c_tanh_doc},
        {NULL,          NULL}           /* sentinel */
 };
 
index 59e4c6c269cfce4a09cfacbada2f9fb7f989182d..78a2b4512405fae9a68fd98690f46bdf91b68c55 100644 (file)
@@ -227,8 +227,8 @@ is made.";
 /* List of functions exported by this module */
 
 static PyMethodDef md5_functions[] = {
-       {"new",         (PyCFunction)MD5_new, 1, new_doc},
-       {"md5",         (PyCFunction)MD5_new, 1, new_doc}, /* Backward compatibility */
+       {"new",         (PyCFunction)MD5_new, METH_VARARGS, new_doc},
+       {"md5",         (PyCFunction)MD5_new, METH_VARARGS, new_doc}, /* Backward compatibility */
        {NULL,          NULL}   /* Sentinel */
 };
 
index 3ebac7fb293647e12a2b6da4abfe2eaee3caee88..1595c0c64c3a48c1f35ffb5be5d7de33c331a6de 100644 (file)
@@ -180,12 +180,18 @@ new_class(PyObject* unused, PyObject* args)
 }
 
 static PyMethodDef new_methods[] = {
-       {"instance",            new_instance,           1, new_instance_doc},
-       {"instancemethod",      new_instancemethod,     1, new_im_doc},
-       {"function",            new_function,           1, new_function_doc},
-       {"code",                new_code,               1, new_code_doc},
-       {"module",              new_module,             1, new_module_doc},
-       {"classobj",            new_class,              1, new_class_doc},
+       {"instance",            new_instance,           
+        METH_VARARGS, new_instance_doc},
+       {"instancemethod",      new_instancemethod,     
+        METH_VARARGS, new_im_doc},
+       {"function",            new_function,           
+        METH_VARARGS, new_function_doc},
+       {"code",                new_code,               
+        METH_VARARGS, new_code_doc},
+       {"module",              new_module,             
+        METH_VARARGS, new_module_doc},
+       {"classobj",            new_class,              
+        METH_VARARGS, new_class_doc},
        {NULL,                  NULL}           /* sentinel */
 };
 
index 0fd4c288ef156bc56e9b23bd3fb3dae7f363bd2c..11804c7cc3590a52c44998ab801478357b9d7f92 100644 (file)
@@ -323,15 +323,19 @@ Insert text into the command line.\
 
 static struct PyMethodDef readline_methods[] =
 {
-       {"parse_and_bind", parse_and_bind, 1, doc_parse_and_bind},
+       {"parse_and_bind", parse_and_bind, METH_VARARGS, doc_parse_and_bind},
        {"get_line_buffer", get_line_buffer, 0, doc_get_line_buffer},
-       {"insert_text", insert_text, 1, doc_insert_text},
-       {"read_init_file", read_init_file, 1, doc_read_init_file},
-       {"read_history_file", read_history_file, 1, doc_read_history_file},
-       {"write_history_file", write_history_file, 1, doc_write_history_file},
-       {"set_history_length", set_history_length, 1, set_history_length_doc},
-       {"get_history_length", get_history_length, 1, get_history_length_doc},
-       {"set_completer", set_completer, 1, doc_set_completer},
+       {"insert_text", insert_text, METH_VARARGS, doc_insert_text},
+       {"read_init_file", read_init_file, METH_VARARGS, doc_read_init_file},
+       {"read_history_file", read_history_file, 
+        METH_VARARGS, doc_read_history_file},
+       {"write_history_file", write_history_file, 
+        METH_VARARGS, doc_write_history_file},
+       {"set_history_length", set_history_length, 
+        METH_VARARGS, set_history_length_doc},
+       {"get_history_length", get_history_length, 
+        METH_VARARGS, get_history_length_doc},
+       {"set_completer", set_completer, METH_VARARGS, doc_set_completer},
        {"get_begidx", get_begidx, 0, doc_get_begidx},
        {"get_endidx", get_endidx, 0, doc_get_endidx},
 
index 56378acf692bde3b284efe1bb0efee720fce9642..3ff7abd0246f0dc38116e91439e33b7f2e013d10 100644 (file)
@@ -1344,49 +1344,49 @@ of the socket (flag == 1), or both ends (flag == 2).";
 /* List of methods for socket objects */
 
 static PyMethodDef PySocketSock_methods[] = {
-       {"accept",              (PyCFunction)PySocketSock_accept, 1,
+       {"accept",              (PyCFunction)PySocketSock_accept, METH_VARARGS,
                                accept_doc},
-       {"bind",                (PyCFunction)PySocketSock_bind, 1,
+       {"bind",                (PyCFunction)PySocketSock_bind, METH_VARARGS,
                                bind_doc},
-       {"close",               (PyCFunction)PySocketSock_close, 1,
+       {"close",               (PyCFunction)PySocketSock_close, METH_VARARGS,
                                close_doc},
-       {"connect",             (PyCFunction)PySocketSock_connect, 1,
+       {"connect",             (PyCFunction)PySocketSock_connect, METH_VARARGS,
                                connect_doc},
-       {"connect_ex",          (PyCFunction)PySocketSock_connect_ex, 1,
+       {"connect_ex",          (PyCFunction)PySocketSock_connect_ex, METH_VARARGS,
                                connect_ex_doc},
 #ifndef NO_DUP
-       {"dup",                 (PyCFunction)PySocketSock_dup, 1,
+       {"dup",                 (PyCFunction)PySocketSock_dup, METH_VARARGS,
                                dup_doc},
 #endif
-       {"fileno",              (PyCFunction)PySocketSock_fileno, 1,
+       {"fileno",              (PyCFunction)PySocketSock_fileno, METH_VARARGS,
                                fileno_doc},
 #ifdef HAVE_GETPEERNAME
-       {"getpeername",         (PyCFunction)PySocketSock_getpeername, 1,
+       {"getpeername",         (PyCFunction)PySocketSock_getpeername, METH_VARARGS,
                                getpeername_doc},
 #endif
-       {"getsockname",         (PyCFunction)PySocketSock_getsockname, 1,
+       {"getsockname",         (PyCFunction)PySocketSock_getsockname, METH_VARARGS,
                                getsockname_doc},
-       {"getsockopt",          (PyCFunction)PySocketSock_getsockopt, 1,
+       {"getsockopt",          (PyCFunction)PySocketSock_getsockopt, METH_VARARGS,
                                getsockopt_doc},
-       {"listen",              (PyCFunction)PySocketSock_listen, 1,
+       {"listen",              (PyCFunction)PySocketSock_listen, METH_VARARGS,
                                listen_doc},
 #ifndef NO_DUP
-       {"makefile",            (PyCFunction)PySocketSock_makefile, 1,
+       {"makefile",            (PyCFunction)PySocketSock_makefile, METH_VARARGS,
                                makefile_doc},
 #endif
-       {"recv",                (PyCFunction)PySocketSock_recv, 1,
+       {"recv",                (PyCFunction)PySocketSock_recv, METH_VARARGS,
                                recv_doc},
-       {"recvfrom",            (PyCFunction)PySocketSock_recvfrom, 1,
+       {"recvfrom",            (PyCFunction)PySocketSock_recvfrom, METH_VARARGS,
                                recvfrom_doc},
-       {"send",                (PyCFunction)PySocketSock_send, 1,
+       {"send",                (PyCFunction)PySocketSock_send, METH_VARARGS,
                                send_doc},
-       {"sendto",              (PyCFunction)PySocketSock_sendto, 1,
+       {"sendto",              (PyCFunction)PySocketSock_sendto, METH_VARARGS,
                                sendto_doc},
-       {"setblocking",         (PyCFunction)PySocketSock_setblocking, 1,
+       {"setblocking",         (PyCFunction)PySocketSock_setblocking, METH_VARARGS,
                                setblocking_doc},
-       {"setsockopt",          (PyCFunction)PySocketSock_setsockopt, 1,
+       {"setsockopt",          (PyCFunction)PySocketSock_setsockopt, METH_VARARGS,
                                setsockopt_doc},
-       {"shutdown",            (PyCFunction)PySocketSock_shutdown, 1,
+       {"shutdown",            (PyCFunction)PySocketSock_shutdown, METH_VARARGS,
                                shutdown_doc},
        {NULL,                  NULL}           /* sentinel */
 };
@@ -2199,24 +2199,39 @@ static PyObject *SSL_SSLread(SSLObject *self, PyObject *args)
 /* List of functions exported by this module. */
 
 static PyMethodDef PySocket_methods[] = {
-       {"gethostbyname",       PySocket_gethostbyname, 1, gethostbyname_doc},
-       {"gethostbyname_ex",    PySocket_gethostbyname_ex, 1, ghbn_ex_doc},
-       {"gethostbyaddr",       PySocket_gethostbyaddr, 1, gethostbyaddr_doc},
-       {"gethostname",         PySocket_gethostname, 1, gethostname_doc},
-       {"getservbyname",       PySocket_getservbyname, 1, getservbyname_doc},
-       {"getprotobyname",      PySocket_getprotobyname, 1,getprotobyname_doc},
-       {"socket",              PySocket_socket, 1, socket_doc},
+       {"gethostbyname",       PySocket_gethostbyname, 
+        METH_VARARGS, gethostbyname_doc},
+       {"gethostbyname_ex",    PySocket_gethostbyname_ex, 
+        METH_VARARGS, ghbn_ex_doc},
+       {"gethostbyaddr",       PySocket_gethostbyaddr, 
+        METH_VARARGS, gethostbyaddr_doc},
+       {"gethostname",         PySocket_gethostname, 
+        METH_VARARGS, gethostname_doc},
+       {"getservbyname",       PySocket_getservbyname, 
+        METH_VARARGS, getservbyname_doc},
+       {"getprotobyname",      PySocket_getprotobyname, 
+        METH_VARARGS,getprotobyname_doc},
+       {"socket",              PySocket_socket, 
+        METH_VARARGS, socket_doc},
 #ifndef NO_DUP
-       {"fromfd",              PySocket_fromfd, 1, fromfd_doc},
-#endif
-       {"ntohs",               PySocket_ntohs, 1, ntohs_doc},
-       {"ntohl",               PySocket_ntohl, 1, ntohl_doc},
-       {"htons",               PySocket_htons, 1, htons_doc},
-       {"htonl",               PySocket_htonl, 1, htonl_doc},
-       {"inet_aton",           PySocket_inet_aton, 1, inet_aton_doc},
-       {"inet_ntoa",           PySocket_inet_ntoa, 1, inet_ntoa_doc},
+       {"fromfd",              PySocket_fromfd, 
+        METH_VARARGS, fromfd_doc},
+#endif
+       {"ntohs",               PySocket_ntohs, 
+        METH_VARARGS, ntohs_doc},
+       {"ntohl",               PySocket_ntohl, 
+        METH_VARARGS, ntohl_doc},
+       {"htons",               PySocket_htons, 
+        METH_VARARGS, htons_doc},
+       {"htonl",               PySocket_htonl, 
+        METH_VARARGS, htonl_doc},
+       {"inet_aton",           PySocket_inet_aton, 
+        METH_VARARGS, inet_aton_doc},
+       {"inet_ntoa",           PySocket_inet_ntoa, 
+        METH_VARARGS, inet_ntoa_doc},
 #ifdef USE_SSL
-       {"ssl",                 PySocket_ssl, 1, ssl_doc},
+       {"ssl",                 PySocket_ssl, 
+        METH_VARARGS, ssl_doc},
 #endif /* USE_SSL */
        {NULL,                  NULL}            /* Sentinel */
 };
index acb334422112a04bab9504f7a08719b7168b26d0..d230ee1d5fe4cf5a36f761a953e07eb5e67cba35 100644 (file)
@@ -157,10 +157,12 @@ sound_similar(PyObject *self, PyObject *args)
  */
 static PyMethodDef SoundexMethods[] =
 {
-       {"sound_similar", sound_similar, 1, soundex_sound_similar__doc__},
-       {"get_soundex", get_soundex, 1, soundex_get_soundex__doc__},
+       {"sound_similar", sound_similar, 
+        METH_VARARGS, soundex_sound_similar__doc__},
+       {"get_soundex", get_soundex, 
+        METH_VARARGS, soundex_get_soundex__doc__},
 
-    {NULL, NULL }               /* sentinel */
+       {NULL, NULL }               /* sentinel */
 };
 
 
index 0ec9e3dd65c012d69d717452f5cdef2061bf6c56..0353ca555c210dcbb1b980c5445fb8d1de794320 100644 (file)
@@ -1154,26 +1154,40 @@ strop_replace(PyObject *self, PyObject *args)
 
 static PyMethodDef
 strop_methods[] = {
-       {"atof",        strop_atof, 1, atof__doc__},
-       {"atoi",        strop_atoi, 1, atoi__doc__},
-       {"atol",        strop_atol, 1, atol__doc__},
+       {"atof",        strop_atof, 
+        METH_VARARGS, atof__doc__},
+       {"atoi",        strop_atoi, 
+        METH_VARARGS, atoi__doc__},
+       {"atol",        strop_atol, 
+        METH_VARARGS, atol__doc__},
        {"capitalize",  strop_capitalize, 0, capitalize__doc__},
-       {"count",       strop_count, 1, count__doc__},
-       {"expandtabs",  strop_expandtabs, 1, expandtabs__doc__},
-       {"find",        strop_find, 1, find__doc__},
-       {"join",        strop_joinfields, 1, joinfields__doc__},
-       {"joinfields",  strop_joinfields, 1, joinfields__doc__},
+       {"count",       strop_count, 
+        METH_VARARGS, count__doc__},
+       {"expandtabs",  strop_expandtabs, 
+        METH_VARARGS, expandtabs__doc__},
+       {"find",        strop_find, 
+        METH_VARARGS, find__doc__},
+       {"join",        strop_joinfields, 
+        METH_VARARGS, joinfields__doc__},
+       {"joinfields",  strop_joinfields, 
+        METH_VARARGS, joinfields__doc__},
        {"lstrip",      strop_lstrip, 0, lstrip__doc__},
        {"lower",       strop_lower, 0, lower__doc__},
-       {"maketrans",   strop_maketrans, 1, maketrans__doc__},
-       {"replace",     strop_replace, 1, replace__doc__},
-       {"rfind",       strop_rfind, 1, rfind__doc__},
+       {"maketrans",   strop_maketrans, 
+        METH_VARARGS, maketrans__doc__},
+       {"replace",     strop_replace, 
+        METH_VARARGS, replace__doc__},
+       {"rfind",       strop_rfind, 
+        METH_VARARGS, rfind__doc__},
        {"rstrip",      strop_rstrip, 0, rstrip__doc__},
-       {"split",       strop_splitfields, 1, splitfields__doc__},
-       {"splitfields", strop_splitfields, 1, splitfields__doc__},
+       {"split",       strop_splitfields, 
+        METH_VARARGS, splitfields__doc__},
+       {"splitfields", strop_splitfields, 
+        METH_VARARGS, splitfields__doc__},
        {"strip",       strop_strip, 0, strip__doc__},
        {"swapcase",    strop_swapcase, 0, swapcase__doc__},
-       {"translate",   strop_translate, 1, translate__doc__},
+       {"translate",   strop_translate, 
+        METH_VARARGS, translate__doc__},
        {"upper",       strop_upper, 0, upper__doc__},
        {NULL,          NULL}   /* sentinel */
 };
index ef73c26fc6a278552044cfdb3df843ebda7dce18..5d0de4a14dc011de343c042bac1c354fe65b8b08 100644 (file)
@@ -337,9 +337,11 @@ be relied upon, and the number should be seen purely as a magic cookie.\n\
 A thread's identity may be reused for another thread after it exits.";
 
 static PyMethodDef thread_methods[] = {
-       {"start_new_thread",    (PyCFunction)thread_PyThread_start_new_thread, 1,
+       {"start_new_thread",    (PyCFunction)thread_PyThread_start_new_thread,
+                               METH_VARARGS,
                                start_new_doc},
-       {"start_new",           (PyCFunction)thread_PyThread_start_new_thread, 1,
+       {"start_new",           (PyCFunction)thread_PyThread_start_new_thread, 
+                               METH_VARARGS,
                                start_new_doc},
        {"allocate_lock",       (PyCFunction)thread_PyThread_allocate_lock, 0,
                                allocate_doc},
index db8e163107c55aae2a81be634a14ffa495c37f07..e84a32cd54f1686d57149820894becef6a9c1321 100644 (file)
@@ -498,16 +498,16 @@ static PyMethodDef time_methods[] = {
        {"sleep",       time_sleep, 0, sleep_doc},
        {"gmtime",      time_gmtime, 0, gmtime_doc},
        {"localtime",   time_localtime, 0, localtime_doc},
-       {"asctime",     time_asctime, 1, asctime_doc},
+       {"asctime",     time_asctime, METH_VARARGS, asctime_doc},
        {"ctime",       time_ctime, 0, ctime_doc},
 #ifdef HAVE_MKTIME
-       {"mktime",      time_mktime, 1, mktime_doc},
+       {"mktime",      time_mktime, METH_VARARGS, mktime_doc},
 #endif
 #ifdef HAVE_STRFTIME
-       {"strftime",    time_strftime, 1, strftime_doc},
+       {"strftime",    time_strftime, METH_VARARGS, strftime_doc},
 #endif
 #ifdef HAVE_STRPTIME
-       {"strptime",    time_strptime, 1, strptime_doc},
+       {"strptime",    time_strptime, METH_VARARGS, strptime_doc},
 #endif
        {NULL,          NULL}           /* sentinel */
 };