mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +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
|
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)
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue