summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2006-05-25 19:03:19 (GMT)
committerBob Ippolito <bob@redivi.com>2006-05-25 19:03:19 (GMT)
commit3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b (patch)
tree81642195bfeaf794c7a4acab387404dca999fb23 /Modules
parent60cbb3fe491d27fda77a0e9603ce8aeca32a69c2 (diff)
downloadcpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.zip
cpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.tar.gz
cpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.tar.bz2
Fix Cygwin compiler issue
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_struct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 69ab13f..ec896bf 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1416,7 +1416,7 @@ static PyMemberDef s_memberlist[] = {
static
PyTypeObject PyStructType = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0,
"Struct",
sizeof(PyStructObject),
@@ -1467,6 +1467,10 @@ init_struct(void)
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);