Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98767da

Browse files
Fix compile
1 parent 65654b4 commit 98767da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/_ctypes/stgdict.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,11 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
431431
int ms_struct = 0;
432432
#endif
433433

434-
if (_PyObject_LookupAttr(type, &_Py_ID(_ms_struct_), &tmp) < 0) {
434+
if (PyObject_GetOptionalAttr(type, &_Py_ID(_ms_struct_), &tmp) < 0) {
435435
return -1;
436436
}
437437
if (tmp) {
438-
ms_struct = _PyLong_AsInt(tmp);
438+
ms_struct = PyLong_AsInt(tmp);
439439
Py_DECREF(tmp);
440440
if (PyErr_Occurred()) {
441441
if (PyErr_ExceptionMatches(PyExc_TypeError) ||

0 commit comments

Comments
 (0)