bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492) · python/cpython@c9a413e (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit c9a413e

vstinnervsajip

authored and

committed

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

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -701,7 +701,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
701 701 assert(actual_type_index <= MAX_ELEMENTS);
702 702 }
703 703 else {
704 -int length = dict->length;
704 +Py_ssize_t length = dict->length;
705 705 StgDictObject *edict;
706 706
707 707 edict = PyType_stgdict(dict->proto);