diff options
author | Bob Ippolito <bob@redivi.com> | 2006-05-25 19:03:19 (GMT) |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2006-05-25 19:03:19 (GMT) |
commit | 3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b (patch) | |
tree | 81642195bfeaf794c7a4acab387404dca999fb23 /Modules | |
parent | 60cbb3fe491d27fda77a0e9603ce8aeca32a69c2 (diff) | |
download | cpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.zip cpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.tar.gz cpython-3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b.tar.bz2 |
Fix Cygwin compiler issue
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_struct.c | 6 |
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); |