summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r--Modules/zlibmodule.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 51395a2..badc090 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -961,8 +961,7 @@ static PyMethodDef zlib_methods[] =
};
static PyTypeObject Comptype = {
- PyObject_HEAD_INIT(0)
- 0,
+ PyVarObject_HEAD_INIT(0, 0)
"zlib.Compress",
sizeof(compobject),
0,
@@ -978,8 +977,7 @@ static PyTypeObject Comptype = {
};
static PyTypeObject Decomptype = {
- PyObject_HEAD_INIT(0)
- 0,
+ PyVarObject_HEAD_INIT(0, 0)
"zlib.Decompress",
sizeof(compobject),
0,
@@ -1013,8 +1011,8 @@ PyMODINIT_FUNC
PyInit_zlib(void)
{
PyObject *m, *ver;
- Comptype.ob_type = &PyType_Type;
- Decomptype.ob_type = &PyType_Type;
+ Py_Type(&Comptype) = &PyType_Type;
+ Py_Type(&Decomptype) = &PyType_Type;
m = Py_InitModule4("zlib", zlib_methods,
zlib_module_documentation,
(PyObject*)NULL,PYTHON_API_VERSION);