Patch #676839: Cygwin _iconv_codec module patch

The attached patch enables the _iconv_codec
module to build cleanly under Cygwin.
This commit is contained in:
Jason Tishler 2003-02-10 20:48:35 +00:00
parent 8437570ec2
commit 0c10015a6e
1 changed files with 2 additions and 1 deletions

View File

@ -607,7 +607,7 @@ iconvcodec_repr(PyObject *self)
} }
static PyTypeObject iconvcodec_Type = { static PyTypeObject iconvcodec_Type = {
PyObject_HEAD_INIT(&PyType_Type) PyObject_HEAD_INIT(NULL)
0, /* Number of items for varobject */ 0, /* Number of items for varobject */
"iconvcodec", /* Name of this type */ "iconvcodec", /* Name of this type */
sizeof(iconvcodecObject), /* Basic object size */ sizeof(iconvcodecObject), /* Basic object size */
@ -688,6 +688,7 @@ init_iconv_codec(void)
Py_FatalError("can't initialize the _iconv_codec module: mixed endianess"); Py_FatalError("can't initialize the _iconv_codec module: mixed endianess");
iconv_close(hdl); iconv_close(hdl);
iconvcodec_Type.ob_type = &PyType_Type;
m = Py_InitModule("_iconv_codec", _iconv_codec_methods); m = Py_InitModule("_iconv_codec", _iconv_codec_methods);
PyModule_AddStringConstant(m, "__version__", (char*)__version__); PyModule_AddStringConstant(m, "__version__", (char*)__version__);