Kaydet (Commit) 3fc2bb9c authored tarafından Bob Ippolito's avatar Bob Ippolito

Fix Cygwin compiler issue

üst 60cbb3fe
...@@ -1416,7 +1416,7 @@ static PyMemberDef s_memberlist[] = { ...@@ -1416,7 +1416,7 @@ static PyMemberDef s_memberlist[] = {
static static
PyTypeObject PyStructType = { PyTypeObject PyStructType = {
PyObject_HEAD_INIT(&PyType_Type) PyObject_HEAD_INIT(NULL)
0, 0,
"Struct", "Struct",
sizeof(PyStructObject), sizeof(PyStructObject),
...@@ -1467,6 +1467,10 @@ init_struct(void) ...@@ -1467,6 +1467,10 @@ init_struct(void)
if (m == NULL) if (m == NULL)
return; return;
PyStructType.ob_type = &PyType_Type;
if (PyType_Ready(&PyStructType) < 0)
return;
/* Add some symbolic constants to the module */ /* Add some symbolic constants to the module */
if (StructError == NULL) { if (StructError == NULL) {
StructError = PyErr_NewException("struct.error", NULL, NULL); StructError = PyErr_NewException("struct.error", NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment