Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a0d1e7

Browse files
committed
odictobject.c: fix compiler warning
PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid overflow.
1 parent 9a8b177 commit 4a0d1e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/odictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ odict_reduce(register PyODictObject *od)
998998
goto Done;
999999
else {
10001000
PyObject *empty, *od_vars, *iterator, *key;
1001-
int ns_len;
1001+
Py_ssize_t ns_len;
10021002

10031003
/* od.__dict__ isn't necessarily a dict... */
10041004
ns = PyObject_CallMethod((PyObject *)vars, "copy", NULL);

0 commit comments

Comments
 (0)