mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Fix Cygwin compiler issue
This commit is contained in:
parent
60cbb3fe49
commit
3fc2bb9ccd
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue