Apparently, mmap_object_type.ob_type wasn't initialized properly for UNIX platforms. The patch below fixes the problem for Linux, and I believe it should work for windows as well.
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.26
diff -c -r2.26 mmapmodule.c
*** mmapmodule.c 2001/01/10 21:03:32 2.26
--- mmapmodule.c 2001/01/14 04:03:15
***************
*** 841,849 ****
int fileno;
HANDLE fh = 0;
- /* Patch the object type */
- mmap_object_type.ob_type = &PyType_Type;
-
if (!PyArg_ParseTuple(args,
"iO|z",
&fileno,
--- 841,846 ----
***************
*** 956,961 ****
--- 953,962 ----
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;
|