Fix for #1087741 patch.
This commit is contained in:
parent
48c6293500
commit
d02fc48f67
|
@ -420,6 +420,13 @@ class MmapTests(unittest.TestCase):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
def test_subclass(self):
|
||||
class anon_mmap(mmap.mmap):
|
||||
def __new__(klass, *args, **kwargs):
|
||||
return mmap.mmap.__new__(klass, -1, *args, **kwargs)
|
||||
anon_mmap(PAGESIZE)
|
||||
|
||||
|
||||
def test_main():
|
||||
run_unittest(MmapTests)
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ mmap_object_dealloc(mmap_object *m_obj)
|
|||
}
|
||||
#endif /* UNIX */
|
||||
|
||||
PyObject_Del(m_obj);
|
||||
m_obj->ob_type->tp_free((PyObject*)m_obj);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Reference in New Issue