diff options
author | Guido van Rossum <guido@python.org> | 1997-12-18 05:21:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-18 05:21:29 (GMT) |
commit | 9ec0f8b4050d7e324377bf35733779ef896ce7e0 (patch) | |
tree | 946a4771c5fd0e8a334f71f6bdd781ededf195f9 /Modules/zlibmodule.c | |
parent | 629bcfb8f907cf25bcdadb6a3af5f154fc0d5550 (diff) | |
download | cpython-9ec0f8b4050d7e324377bf35733779ef896ce7e0.zip cpython-9ec0f8b4050d7e324377bf35733779ef896ce7e0.tar.gz cpython-9ec0f8b4050d7e324377bf35733779ef896ce7e0.tar.bz2 |
Win32 treatment.
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r-- | Modules/zlibmodule.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 98dbfa5..1f99646 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -1,6 +1,9 @@ /* zlibmodule.c -- gzip-compatible data compression */ #include "Python.h" +#ifdef MS_WIN32 +#define ZLIB_DLL +#endif #include "zlib.h" /* The following parameters are copied from zutil.h, version 0.95 */ @@ -722,7 +725,7 @@ static PyMethodDef zlib_methods[] = }; statichere PyTypeObject Comptype = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(0) 0, "Compress", sizeof(compobject), @@ -739,7 +742,7 @@ statichere PyTypeObject Comptype = { }; statichere PyTypeObject Decomptype = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(0) 0, "Decompress", sizeof(compobject), @@ -797,6 +800,8 @@ void PyInit_zlib() { PyObject *m, *d, *ver; + Comptype.ob_type = &PyType_Type; + Decomptype.ob_type = &PyType_Type; m = Py_InitModule4("zlib", zlib_methods, zlib_module_documentation, (PyObject*)NULL,PYTHON_API_VERSION); |