Skip to content

Commit c9a413e

Browse files
vstinnervsajip
authored andcommitted
bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492)
bpo-22273, bpo-38321: Fix following warning: modules\_ctypes\stgdict.c(704): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
1 parent efe74b6 commit c9a413e

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
@@ -701,7 +701,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
701701
assert(actual_type_index <= MAX_ELEMENTS);
702702
}
703703
else {
704-
int length = dict->length;
704+
Py_ssize_t length = dict->length;
705705
StgDictObject *edict;
706706

707707
edict = PyType_stgdict(dict->proto);

0 commit comments

Comments
 (0)