diff options
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r-- | Modules/cStringIO.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index 42f2de2..16d4173 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -506,8 +506,7 @@ O_dealloc(Oobject *self) { PyDoc_STRVAR(Otype__doc__, "Simple type for output to strings."); static PyTypeObject Otype = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "cStringIO.StringO", /*tp_name*/ sizeof(Oobject), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -626,8 +625,7 @@ PyDoc_STRVAR(Itype__doc__, "Simple type for treating strings as input file streams"); static PyTypeObject Itype = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ + PyVarObject_HEAD_INIT(NULL, 0) "cStringIO.StringI", /*tp_name*/ sizeof(Iobject), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -737,8 +735,8 @@ initcStringIO(void) { d = PyModule_GetDict(m); /* Export C API */ - Itype.ob_type=&PyType_Type; - Otype.ob_type=&PyType_Type; + Py_Type(&Itype)=&PyType_Type; + Py_Type(&Otype)=&PyType_Type; if (PyType_Ready(&Otype) < 0) return; if (PyType_Ready(&Itype) < 0) return; PyDict_SetItemString(d,"cStringIO_CAPI", |