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 208569610a..5834e20273 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -514,8 +514,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*/ @@ -635,8 +634,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*/ @@ -746,8 +744,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", |