From: Bob Ippolito Date: Thu, 25 May 2006 19:03:19 +0000 (+0000) Subject: Fix Cygwin compiler issue X-Git-Tag: v2.5b1~522 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fc2bb9ccd6dc6b9b354bf31337297b5d3e3b44b;p=python Fix Cygwin compiler issue --- diff --git a/Modules/_struct.c b/Modules/_struct.c index 69ab13f476..ec896bf24d 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);