diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-14 05:05:51 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-14 05:05:51 (GMT) |
commit | 2caf8df86802fb24a23ed2cf57674618b5a8f674 (patch) | |
tree | d458a669fe9b6733ad2e23eee82b00f39c955b4b /Modules | |
parent | b9e202b2dc341f6bcca7719eb40d00f5e03ea4cf (diff) | |
download | cpython-2caf8df86802fb24a23ed2cf57674618b5a8f674.zip cpython-2caf8df86802fb24a23ed2cf57674618b5a8f674.tar.gz cpython-2caf8df86802fb24a23ed2cf57674618b5a8f674.tar.bz2 |
SF bug 128713: type(mmap_object) blew up on Linux.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mmapmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 @@ 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; |