summaryrefslogtreecommitdiff
path: root/Modules/_ctypes/stgdict.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_ctypes/stgdict.c')
-rw-r--r--Modules/_ctypes/stgdict.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c
index 262d0b4897..2338818a9a 100644
--- a/Modules/_ctypes/stgdict.c
+++ b/Modules/_ctypes/stgdict.c
@@ -335,7 +335,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
isPacked = PyObject_GetAttrString(type, "_pack_");
if (isPacked) {
- pack = PyLong_AsLong(isPacked);
+ pack = _PyLong_AsInt(isPacked);
if (pack < 0 || PyErr_Occurred()) {
Py_XDECREF(isPacked);
PyErr_SetString(PyExc_ValueError,