Fix Cygwin compiler issue

This commit is contained in:
Bob Ippolito 2006-05-25 19:03:19 +00:00
parent 60cbb3fe49
commit 3fc2bb9ccd

View file

@ -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);