diff options
author | Guido van Rossum <guido@python.org> | 2001-10-15 21:12:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-15 21:12:54 (GMT) |
commit | 17209fcf1f3d8a06237c8f326ca2608fd2cb9ab4 (patch) | |
tree | cc6196c09f8d9959f753f5f918b3a2754664d04d | |
parent | 2f3ca6eeb6eeebcfa038cd52aca5fecfa74dbd28 (diff) | |
download | cpython-17209fcf1f3d8a06237c8f326ca2608fd2cb9ab4.zip cpython-17209fcf1f3d8a06237c8f326ca2608fd2cb9ab4.tar.gz cpython-17209fcf1f3d8a06237c8f326ca2608fd2cb9ab4.tar.bz2 |
Fix a bunch of warnings reported by Skip.
To whoever who changed a bunch of (PyCFunction) casts to
(PyNoArgsFunction) in PyMethodDef initializers: don't do that. The
cast is to shut the compiler up. The compiler wants the function
pointer initializer to be a PyCFunction.
-rw-r--r-- | Modules/socketmodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 053d2ba..b6e415e 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1622,27 +1622,27 @@ of the socket (flag == 1), or both ends (flag == 2)."; /* List of methods for socket objects */ static PyMethodDef PySocketSock_methods[] = { - {"accept", (PyNoArgsFunction)PySocketSock_accept, METH_NOARGS, + {"accept", (PyCFunction)PySocketSock_accept, METH_NOARGS, accept_doc}, {"bind", (PyCFunction)PySocketSock_bind, METH_O, bind_doc}, - {"close", (PyNoArgsFunction)PySocketSock_close, METH_NOARGS, + {"close", (PyCFunction)PySocketSock_close, METH_NOARGS, close_doc}, {"connect", (PyCFunction)PySocketSock_connect, METH_O, connect_doc}, {"connect_ex", (PyCFunction)PySocketSock_connect_ex, METH_O, connect_ex_doc}, #ifndef NO_DUP - {"dup", (PyNoArgsFunction)PySocketSock_dup, METH_NOARGS, + {"dup", (PyCFunction)PySocketSock_dup, METH_NOARGS, dup_doc}, #endif - {"fileno", (PyNoArgsFunction)PySocketSock_fileno, METH_NOARGS, + {"fileno", (PyCFunction)PySocketSock_fileno, METH_NOARGS, fileno_doc}, #ifdef HAVE_GETPEERNAME - {"getpeername", (PyNoArgsFunction)PySocketSock_getpeername, + {"getpeername", (PyCFunction)PySocketSock_getpeername, METH_NOARGS, getpeername_doc}, #endif - {"getsockname", (PyNoArgsFunction)PySocketSock_getsockname, + {"getsockname", (PyCFunction)PySocketSock_getsockname, METH_NOARGS, getsockname_doc}, {"getsockopt", (PyCFunction)PySocketSock_getsockopt, METH_VARARGS, getsockopt_doc}, @@ -2733,8 +2733,8 @@ static PyMethodDef PySSLMethods[] = { PySSL_SSLwrite_doc}, {"read", (PyCFunction)PySSL_SSLread, 1, PySSL_SSLread_doc}, - {"server", (PyNoArgsFunction)PySSL_server, METH_NOARGS}, - {"issuer", (PyNoArgsFunction)PySSL_issuer, METH_NOARGS}, + {"server", (PyCFunction)PySSL_server, METH_NOARGS}, + {"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS}, {NULL, NULL} }; |