[Python-checkins] r46242 - python/trunk/Modules/_struct.c
bob.ippolito
python-checkins at python.org
Thu May 25 21:03:22 CEST 2006
Author: bob.ippolito
Date: Thu May 25 21:03:19 2006
New Revision: 46242
Modified:
python/trunk/Modules/_struct.c
Log:
Fix Cygwin compiler issue
Modified: python/trunk/Modules/_struct.c
==============================================================================
--- python/trunk/Modules/_struct.c (original)
+++ python/trunk/Modules/_struct.c Thu May 25 21:03:19 2006
@@ -1416,7 +1416,7 @@
static
PyTypeObject PyStructType = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0,
"Struct",
sizeof(PyStructObject),
@@ -1467,6 +1467,10 @@
if (m == NULL)
return;
+ PyStructType.ob_type = &PyType_Type;
+ if (PyType_Ready(&PyStructType) < 0)
+ return;
+
/* Add some symbolic constants to the module */
if (StructError == NULL) {
StructError = PyErr_NewException("struct.error", NULL, NULL);
More information about the Python-checkins
mailing list