Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 27104:2443c557cbc3 legacy-trunk
Patch #661760: Cygwin auto-import module patch
The attached patch enables shared extension
modules to build cleanly under Cygwin without
moving the static initialization of certain function
pointers (i.e., ones exported from the Python
DLL core) to a module initialization function.
Additionally, this patch fixes the modules that
have been changed in the past to accommodate
Cygwin.
| author | Jason Tishler <jason@tishler.net> |
|---|---|
| date | Mon, 06 Jan 2003 12:41:26 +0000 |
| parents | 9ee4fd05d3cb |
| children | 8d83578dba81 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Mon Jan 06 12:30:53 2003 +0000 +++ b/Modules/socketmodule.c Mon Jan 06 12:41:26 2003 +0000 @@ -2115,7 +2115,7 @@ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ - 0, /* set below */ /* tp_getattro */ + PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ @@ -2135,9 +2135,9 @@ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ sock_initobj, /* tp_init */ - 0, /* set below */ /* tp_alloc */ + PyType_GenericAlloc, /* tp_alloc */ sock_new, /* tp_new */ - 0, /* set below */ /* tp_free */ + PyObject_Del, /* tp_free */ }; @@ -3147,9 +3147,6 @@ return; sock_type.ob_type = &PyType_Type; - sock_type.tp_getattro = PyObject_GenericGetAttr; - sock_type.tp_alloc = PyType_GenericAlloc; - sock_type.tp_free = PyObject_Del; m = Py_InitModule3(PySocket_MODULE_NAME, socket_methods, socket_doc);
