Commit d7821381 authored by Jim Fulton's avatar Jim Fulton

Moved initialization of python type object pointer to init to make win32 happy.

parent bfb98ae8
...@@ -602,7 +602,7 @@ static PyMethodDef zlib_methods[] = ...@@ -602,7 +602,7 @@ static PyMethodDef zlib_methods[] =
}; };
statichere PyTypeObject Comptype = { statichere PyTypeObject Comptype = {
PyObject_HEAD_INIT(&PyType_Type) PyObject_HEAD_INIT(NULL)
0, 0,
"Compress", "Compress",
sizeof(compobject), sizeof(compobject),
...@@ -619,7 +619,7 @@ statichere PyTypeObject Comptype = { ...@@ -619,7 +619,7 @@ statichere PyTypeObject Comptype = {
}; };
statichere PyTypeObject Decomptype = { statichere PyTypeObject Decomptype = {
PyObject_HEAD_INIT(&PyType_Type) PyObject_HEAD_INIT(NULL)
0, 0,
"Decompress", "Decompress",
sizeof(compobject), sizeof(compobject),
...@@ -661,11 +661,15 @@ void ...@@ -661,11 +661,15 @@ void
PyInit_zlib() PyInit_zlib()
{ {
PyObject *m, *d; PyObject *m, *d;
Comptype.ob_type=&PyType_Type;
Decomptype.ob_type=&PyType_Type;
m = Py_InitModule("zlib", zlib_methods); m = Py_InitModule("zlib", zlib_methods);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
ZlibError = Py_BuildValue("s", "zlib.error"); ZlibError = Py_BuildValue("s", "zlib.error");
PyDict_SetItemString(d, "error", ZlibError); PyDict_SetItemString(d, "error", ZlibError);
PyDict_SetItemString(d, "IDString", "$Id: zlib.c,v 1.1 1997/07/17 13:34:04 jim Exp $"); PyDict_SetItemString(d, "IDString", "$Id: zlib.c,v 1.2 1997/07/17 18:13:12 jim Exp $");
insint(d, "MAX_WBITS", MAX_WBITS); insint(d, "MAX_WBITS", MAX_WBITS);
insint(d, "DEFLATED", DEFLATED); insint(d, "DEFLATED", DEFLATED);
insint(d, "DEF_MEM_LEVEL", DEF_MEM_LEVEL); insint(d, "DEF_MEM_LEVEL", DEF_MEM_LEVEL);
......
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