Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 20920:90871fa43f4e legacy-trunk
Fixes to compile cPickle.c & socketmodule.c on cygwin and possibly
other platforms that have funny ideas about whether addresses of
functions in dlls are compile-time constants.
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Fri, 09 Nov 2001 10:06:23 +0000 |
| parents | 06d95b6877c4 |
| children | 9f66aaddf8d4 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri Nov 09 05:03:05 2001 +0000 +++ b/Modules/socketmodule.c Fri Nov 09 10:06:23 2001 +0000 @@ -1877,7 +1877,7 @@ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* set below */ /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ @@ -1897,9 +1897,9 @@ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ PySocketSock_init, /* tp_init */ - PyType_GenericAlloc, /* tp_alloc */ + 0, /* set below */ /* tp_alloc */ PySocketSock_new, /* tp_new */ - _PyObject_Del, /* tp_free */ + 0, /* set below */ /* tp_free */ }; @@ -3133,6 +3133,9 @@ #endif /* MS_WINDOWS */ #endif /* RISCOS */ PySocketSock_Type.ob_type = &PyType_Type; + PySocketSock_Type.tp_getattro = PyObject_GenericGetAttr; + PySocketSock_Type.tp_alloc = PyType_GenericAlloc; + PySocketSock_Type.tp_free = _PyObject_Del; #ifdef USE_SSL PySSL_Type.ob_type = &PyType_Type; #endif
