]> granicus.if.org Git - python/commitdiff
Moved the declaration of PySocketSock_Type from socketmodule.h to
authorTim Peters <tim.peters@gmail.com>
Sun, 17 Feb 2002 04:13:21 +0000 (04:13 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 17 Feb 2002 04:13:21 +0000 (04:13 +0000)
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).

Modules/socketmodule.c
Modules/socketmodule.h

index a8560d6a6ab7cdc9dc2c45674d9a364c303839c7..2f954a9ce3929790366bcacd585b4c3a65d5b6e3 100644 (file)
@@ -251,6 +251,11 @@ static PyObject *PyGAI_Error;
 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. */
index a1a212262a4fc0ac05e35b6fd47c458c02ffe1bc..ef4ba38e275bb9192936408716270ac31c53994f 100644 (file)
@@ -75,13 +75,6 @@ typedef struct {
                                            sets a Python exception */
 } PySocketSockObject;
 
-/* A forward reference to the Socktype type object.
-   The Socktype variable contains pointers to various functions,
-   some of which call newsockobject(), which uses Socktype, so
-   there has to be a circular reference. */
-
-extern DL_IMPORT(PyTypeObject) PySocketSock_Type;
-
 /* --- C API ----------------------------------------------------*/
 
 /* C API for usage by other Python modules */