diff Modules/_iconv_codec.c @ 27806:e8878c8f54df legacy-trunk

Patch #676839: Cygwin _iconv_codec module patch The attached patch enables the _iconv_codec module to build cleanly under Cygwin.
author Jason Tishler <jason@tishler.net>
date Mon, 10 Feb 2003 20:48:35 +0000
parents ed1d4e797109
children 1afafed9fa77
line wrap: on
line diff
--- a/Modules/_iconv_codec.c	Mon Feb 10 20:45:47 2003 +0000
+++ b/Modules/_iconv_codec.c	Mon Feb 10 20:48:35 2003 +0000
@@ -607,7 +607,7 @@
 }
 
 static PyTypeObject iconvcodec_Type = {
-    PyObject_HEAD_INIT(&PyType_Type)
+    PyObject_HEAD_INIT(NULL)
     0,                              /* Number of items for varobject */
     "iconvcodec",                   /* Name of this type */
     sizeof(iconvcodecObject),       /* Basic object size */
@@ -688,6 +688,7 @@
         Py_FatalError("can't initialize the _iconv_codec module: mixed endianess");
     iconv_close(hdl);
 
+    iconvcodec_Type.ob_type = &PyType_Type;
     m = Py_InitModule("_iconv_codec", _iconv_codec_methods);
 
     PyModule_AddStringConstant(m, "__version__", (char*)__version__);