Commit 52444807 authored by Victor Stinner's avatar Victor Stinner

odictobject.c: fix compiler warning

PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid
overflow.
parent f587642c
......@@ -998,7 +998,7 @@ odict_reduce(register PyODictObject *od)
goto Done;
else {
PyObject *empty, *od_vars, *iterator, *key;
int ns_len;
Py_ssize_t ns_len;
/* od.__dict__ isn't necessarily a dict... */
ns = PyObject_CallMethod((PyObject *)vars, "copy", NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment