diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index a8560d6a6ab..2f954a9ce39 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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. */ diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index a1a212262a4..ef4ba38e275 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -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 */