Commit 6a6da1ad authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f4fa63a9
...@@ -953,6 +953,18 @@ pyfileh_open(PyObject *pyfile0, PyObject *args) ...@@ -953,6 +953,18 @@ pyfileh_open(PyObject *pyfile0, PyObject *args)
} }
static void
pyfile_dealloc(PyObject *pyfile0)
{
PyBigFile *pyfile = container_of(pyfile0, PyBigFile, pyobj);
pyfile->blkmmap_ops = NULL;
Py_CLEAR(pyfile->blkmmapper_pycapsule);
pyfile->pyobj.ob_type->tp_free(&pyfile->pyobj);
}
static PyObject * static PyObject *
pyfile_new(PyTypeObject *type, PyObject *args, PyObject *kw) pyfile_new(PyTypeObject *type, PyObject *args, PyObject *kw)
{ {
...@@ -1014,7 +1026,7 @@ static PyTypeObject PyBigFile_Type = { ...@@ -1014,7 +1026,7 @@ static PyTypeObject PyBigFile_Type = {
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_methods = pyfile_methods, .tp_methods = pyfile_methods,
.tp_members = pyfile_members, .tp_members = pyfile_members,
.tp_dealloc = NULL, // XXX .tp_dealloc = pyfile_dealloc,
.tp_new = pyfile_new, .tp_new = pyfile_new,
.tp_doc = "Base class for creating BigFile(s)\n\nTODO describe", // XXX .tp_doc = "Base class for creating BigFile(s)\n\nTODO describe", // XXX
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment