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

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 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