diff options
| author | Jason Tishler <jason@tishler.net> | 2003-01-06 12:41:26 +0000 |
|---|---|---|
| committer | Jason Tishler <jason@tishler.net> | 2003-01-06 12:41:26 +0000 |
| commit | fb8595df4f9583ab9e83826cd782e0c18ba9cffa (patch) | |
| tree | fb178c5308b141f5285fd5b0bb560da02ee8c64c /Modules/socketmodule.c | |
| parent | f2128b004c5cac7ae8766329b061867de6fb6093 (diff) | |
| download | cpython-git-fb8595df4f9583ab9e83826cd782e0c18ba9cffa.tar.gz | |
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.
Diffstat (limited to 'Modules/socketmodule.c')
| -rw-r--r-- | Modules/socketmodule.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 1bbd9411a9..2b0b796079 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2115,7 +2115,7 @@ static PyTypeObject sock_type = { 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 @@ static PyTypeObject sock_type = { 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 @@ init_socket(void) 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); |
