Commit a7c14c25 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 35191c8a
......@@ -199,15 +199,8 @@ static int
pyvma_traverse(PyObject *pyvma0, visitproc visit, void *arg)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
#if 0
VMA *vma = &pyvma->vma;
BigFileH *fileh = vma->fileh;
if (fileh) {
PyBigFileH *pyfileh = container_of(fileh, PyBigFileH, fileh);
Py_VISIT(&pyfileh->pyobj);
}
#endif
/* NOTE don't traverse vma->fileh (see pyvma_clear for details) */
Py_VISIT(pyvma->pyuser);
return 0;
......@@ -224,24 +217,6 @@ pyvma_clear(PyObject *pyvma0)
* would break with BUG asserting that there is no fileh mappings left.
* Protect py-level users from that. */
#if 0
VMA *vma = &pyvma->vma;
BigFileH *fileh = vma->fileh;
/* pyvma->fileh indicates whether vma was yet created (via fileh_mmap()) or not */
if (fileh) {
PyBigFileH *pyfileh = container_of(fileh, PyBigFileH, fileh);
/* NOTE calling vma_unmap in tp_clear - it is a bit hacky but ok.
* we have to call vma_unmap now becuase we'll reset vma->fileh=NULL next.
* pyvma_dealloc also calls pyvma_clear. */
vma_unmap(vma);
vma->fileh = NULL;
Py_DECREF(pyfileh);
}
#endif
Py_CLEAR(pyvma->pyuser);
return 0;
}
......
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