[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.207,1.208 socketmodule.h,1.2,1.3

Tim Peters tim_one@users.sourceforge.net
Sat, 16 Feb 2002 20:13:23 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12979/python/Modules

Modified Files:
	socketmodule.c socketmodule.h 
Log Message:
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).


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -C2 -d -r1.207 -r1.208
*** socketmodule.c	16 Feb 2002 23:13:54 -0000	1.207
--- socketmodule.c	17 Feb 2002 04:13:21 -0000	1.208
***************
*** 252,255 ****
--- 252,260 ----
  #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

Index: socketmodule.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** socketmodule.h	17 Feb 2002 03:58:51 -0000	1.2
--- socketmodule.h	17 Feb 2002 04:13:21 -0000	1.3
***************
*** 76,86 ****
  } 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 ----------------------------------------------------*/
  
--- 76,79 ----