Skip to content

Commit 8991444

Browse files
committed
Use proper PyArg_ParseTuple code for Py_ssize_t
1 parent ba61051 commit 8991444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ PyCStructUnionType_update_stginfo(PyObject *type, PyObject *fields, int isStruct
443443
PyObject *prop;
444444
Py_ssize_t bitsize = 0;
445445

446-
if (!pair || !PyArg_ParseTuple(pair, "UO|i", &name, &desc, &bitsize)) {
446+
if (!pair || !PyArg_ParseTuple(pair, "UO|n", &name, &desc, &bitsize)) {
447447
PyErr_SetString(PyExc_TypeError,
448448
"'_fields_' must be a sequence of (name, C type) pairs");
449449
Py_XDECREF(pair);

0 commit comments

Comments
 (0)