SF bug 128713: type(mmap_object) blew up on Linux.

This commit is contained in:
Tim Peters 2001-01-14 05:05:51 +00:00
parent b9e202b2dc
commit 2caf8df868
4 changed files with 16 additions and 5 deletions

View file

@ -841,9 +841,6 @@ new_mmap_object(PyObject *self, PyObject *args)
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 @@ DL_EXPORT(void)
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;