odictobject.c: fix compiler warning

PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid
overflow.
This commit is contained in:
Victor Stinner 2015-09-18 13:44:11 +02:00
parent 9a8b177e60
commit 4a0d1e7c36
1 changed files with 1 additions and 1 deletions

View File

@ -998,7 +998,7 @@ odict_reduce(register PyODictObject *od)
goto Done; goto Done;
else { else {
PyObject *empty, *od_vars, *iterator, *key; PyObject *empty, *od_vars, *iterator, *key;
int ns_len; Py_ssize_t ns_len;
/* od.__dict__ isn't necessarily a dict... */ /* od.__dict__ isn't necessarily a dict... */
ns = PyObject_CallMethod((PyObject *)vars, "copy", NULL); ns = PyObject_CallMethod((PyObject *)vars, "copy", NULL);