SF bug 128713: type(mmap_object) blew up on Linux.
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index c567e7b..c1cc013 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -841,9 +841,6 @@
int fileno;
HANDLE fh = 0;
- /* Patch the object type */
- mmap_object_type.ob_type = &PyType_Type;
-
if (!PyArg_ParseTuple(args,
"iO|z",
&fileno,
@@ -956,6 +953,10 @@
initmmap(void)
{
PyObject *dict, *module;
+
+ /* Patch the object type */
+ mmap_object_type.ob_type = &PyType_Type;
+
module = Py_InitModule ("mmap", mmap_functions);
dict = PyModule_GetDict (module);
mmap_module_error = PyExc_EnvironmentError;