summaryrefslogtreecommitdiffstats
path: root/Modules/_fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_fileio.c')
-rw-r--r--Modules/_fileio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_fileio.c b/Modules/_fileio.c
index f64708e..60ca8c4 100644
--- a/Modules/_fileio.c
+++ b/Modules/_fileio.c
@@ -281,7 +281,7 @@ fileio_dealloc(PyFileIOObject *self)
Py_DECREF(closeresult);
}
- self->ob_type->tp_free((PyObject *)self);
+ Py_Type(self)->tp_free((PyObject *)self);
}
static PyObject *
@@ -820,8 +820,7 @@ static PyGetSetDef fileio_getsetlist[] = {
};
PyTypeObject PyFileIO_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0,
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
"FileIO",
sizeof(PyFileIOObject),
0,