@@ -1344,49 +1344,49 @@ of the socket (flag == 1), or both ends (flag == 2).";
13441344/* List of methods for socket objects */
13451345
13461346static PyMethodDef PySocketSock_methods [] = {
1347- {"accept" , (PyCFunction )PySocketSock_accept , 1 ,
1347+ {"accept" , (PyCFunction )PySocketSock_accept , METH_VARARGS ,
13481348 accept_doc },
1349- {"bind" , (PyCFunction )PySocketSock_bind , 1 ,
1349+ {"bind" , (PyCFunction )PySocketSock_bind , METH_VARARGS ,
13501350 bind_doc },
1351- {"close" , (PyCFunction )PySocketSock_close , 1 ,
1351+ {"close" , (PyCFunction )PySocketSock_close , METH_VARARGS ,
13521352 close_doc },
1353- {"connect" , (PyCFunction )PySocketSock_connect , 1 ,
1353+ {"connect" , (PyCFunction )PySocketSock_connect , METH_VARARGS ,
13541354 connect_doc },
1355- {"connect_ex" , (PyCFunction )PySocketSock_connect_ex , 1 ,
1355+ {"connect_ex" , (PyCFunction )PySocketSock_connect_ex , METH_VARARGS ,
13561356 connect_ex_doc },
13571357#ifndef NO_DUP
1358- {"dup" , (PyCFunction )PySocketSock_dup , 1 ,
1358+ {"dup" , (PyCFunction )PySocketSock_dup , METH_VARARGS ,
13591359 dup_doc },
13601360#endif
1361- {"fileno" , (PyCFunction )PySocketSock_fileno , 1 ,
1361+ {"fileno" , (PyCFunction )PySocketSock_fileno , METH_VARARGS ,
13621362 fileno_doc },
13631363#ifdef HAVE_GETPEERNAME
1364- {"getpeername" , (PyCFunction )PySocketSock_getpeername , 1 ,
1364+ {"getpeername" , (PyCFunction )PySocketSock_getpeername , METH_VARARGS ,
13651365 getpeername_doc },
13661366#endif
1367- {"getsockname" , (PyCFunction )PySocketSock_getsockname , 1 ,
1367+ {"getsockname" , (PyCFunction )PySocketSock_getsockname , METH_VARARGS ,
13681368 getsockname_doc },
1369- {"getsockopt" , (PyCFunction )PySocketSock_getsockopt , 1 ,
1369+ {"getsockopt" , (PyCFunction )PySocketSock_getsockopt , METH_VARARGS ,
13701370 getsockopt_doc },
1371- {"listen" , (PyCFunction )PySocketSock_listen , 1 ,
1371+ {"listen" , (PyCFunction )PySocketSock_listen , METH_VARARGS ,
13721372 listen_doc },
13731373#ifndef NO_DUP
1374- {"makefile" , (PyCFunction )PySocketSock_makefile , 1 ,
1374+ {"makefile" , (PyCFunction )PySocketSock_makefile , METH_VARARGS ,
13751375 makefile_doc },
13761376#endif
1377- {"recv" , (PyCFunction )PySocketSock_recv , 1 ,
1377+ {"recv" , (PyCFunction )PySocketSock_recv , METH_VARARGS ,
13781378 recv_doc },
1379- {"recvfrom" , (PyCFunction )PySocketSock_recvfrom , 1 ,
1379+ {"recvfrom" , (PyCFunction )PySocketSock_recvfrom , METH_VARARGS ,
13801380 recvfrom_doc },
1381- {"send" , (PyCFunction )PySocketSock_send , 1 ,
1381+ {"send" , (PyCFunction )PySocketSock_send , METH_VARARGS ,
13821382 send_doc },
1383- {"sendto" , (PyCFunction )PySocketSock_sendto , 1 ,
1383+ {"sendto" , (PyCFunction )PySocketSock_sendto , METH_VARARGS ,
13841384 sendto_doc },
1385- {"setblocking" , (PyCFunction )PySocketSock_setblocking , 1 ,
1385+ {"setblocking" , (PyCFunction )PySocketSock_setblocking , METH_VARARGS ,
13861386 setblocking_doc },
1387- {"setsockopt" , (PyCFunction )PySocketSock_setsockopt , 1 ,
1387+ {"setsockopt" , (PyCFunction )PySocketSock_setsockopt , METH_VARARGS ,
13881388 setsockopt_doc },
1389- {"shutdown" , (PyCFunction )PySocketSock_shutdown , 1 ,
1389+ {"shutdown" , (PyCFunction )PySocketSock_shutdown , METH_VARARGS ,
13901390 shutdown_doc },
13911391 {NULL , NULL } /* sentinel */
13921392};
@@ -2199,24 +2199,39 @@ static PyObject *SSL_SSLread(SSLObject *self, PyObject *args)
21992199/* List of functions exported by this module. */
22002200
22012201static PyMethodDef PySocket_methods [] = {
2202- {"gethostbyname" , PySocket_gethostbyname , 1 , gethostbyname_doc },
2203- {"gethostbyname_ex" , PySocket_gethostbyname_ex , 1 , ghbn_ex_doc },
2204- {"gethostbyaddr" , PySocket_gethostbyaddr , 1 , gethostbyaddr_doc },
2205- {"gethostname" , PySocket_gethostname , 1 , gethostname_doc },
2206- {"getservbyname" , PySocket_getservbyname , 1 , getservbyname_doc },
2207- {"getprotobyname" , PySocket_getprotobyname , 1 ,getprotobyname_doc },
2208- {"socket" , PySocket_socket , 1 , socket_doc },
2202+ {"gethostbyname" , PySocket_gethostbyname ,
2203+ METH_VARARGS , gethostbyname_doc },
2204+ {"gethostbyname_ex" , PySocket_gethostbyname_ex ,
2205+ METH_VARARGS , ghbn_ex_doc },
2206+ {"gethostbyaddr" , PySocket_gethostbyaddr ,
2207+ METH_VARARGS , gethostbyaddr_doc },
2208+ {"gethostname" , PySocket_gethostname ,
2209+ METH_VARARGS , gethostname_doc },
2210+ {"getservbyname" , PySocket_getservbyname ,
2211+ METH_VARARGS , getservbyname_doc },
2212+ {"getprotobyname" , PySocket_getprotobyname ,
2213+ METH_VARARGS ,getprotobyname_doc },
2214+ {"socket" , PySocket_socket ,
2215+ METH_VARARGS , socket_doc },
22092216#ifndef NO_DUP
2210- {"fromfd" , PySocket_fromfd , 1 , fromfd_doc },
2211- #endif
2212- {"ntohs" , PySocket_ntohs , 1 , ntohs_doc },
2213- {"ntohl" , PySocket_ntohl , 1 , ntohl_doc },
2214- {"htons" , PySocket_htons , 1 , htons_doc },
2215- {"htonl" , PySocket_htonl , 1 , htonl_doc },
2216- {"inet_aton" , PySocket_inet_aton , 1 , inet_aton_doc },
2217- {"inet_ntoa" , PySocket_inet_ntoa , 1 , inet_ntoa_doc },
2217+ {"fromfd" , PySocket_fromfd ,
2218+ METH_VARARGS , fromfd_doc },
2219+ #endif
2220+ {"ntohs" , PySocket_ntohs ,
2221+ METH_VARARGS , ntohs_doc },
2222+ {"ntohl" , PySocket_ntohl ,
2223+ METH_VARARGS , ntohl_doc },
2224+ {"htons" , PySocket_htons ,
2225+ METH_VARARGS , htons_doc },
2226+ {"htonl" , PySocket_htonl ,
2227+ METH_VARARGS , htonl_doc },
2228+ {"inet_aton" , PySocket_inet_aton ,
2229+ METH_VARARGS , inet_aton_doc },
2230+ {"inet_ntoa" , PySocket_inet_ntoa ,
2231+ METH_VARARGS , inet_ntoa_doc },
22182232#ifdef USE_SSL
2219- {"ssl" , PySocket_ssl , 1 , ssl_doc },
2233+ {"ssl" , PySocket_ssl ,
2234+ METH_VARARGS , ssl_doc },
22202235#endif /* USE_SSL */
22212236 {NULL , NULL } /* Sentinel */
22222237};
0 commit comments