Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 21970:b1a871dc5196 legacy-trunk
Moved the declaration of PySocketSock_Type from socketmodule.h to
socketmodule.c. No code outside of the .c file references it, so it
doesn't belong the .h file (at least not yet ...), and declaring it
an imported symbol in the .h file can't be made to work on Windows (it's
a cross-DLL symbol then) without substantial code rewriting. Also
repaired the comment that goes along with the decl, to stop referring
to names and functions that haven't existed for 7 years <wink>.
socketmodule.c compiles cleanly on Windows again. The test_socket dies
at once, though (later).
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sun, 17 Feb 2002 04:13:21 +0000 |
| parents | 94b90cdd6e0f |
| children | 9e5ff6747437 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Sun Feb 17 03:58:51 2002 +0000 +++ b/Modules/socketmodule.c Sun Feb 17 04:13:21 2002 +0000 @@ -251,6 +251,11 @@ static int taskwindow; #endif +/* A forward reference to the socket type object. + The PySocketSock_Type variable contains pointers to various functions, + some of which call PySocketSock_New(), which uses PySocketSock_Type, so + there has to be a circular reference. */ +staticforward PyTypeObject PySocketSock_Type; /* Convenience function to raise an error according to errno and return a NULL pointer from a function. */
