diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-18 11:44:11 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-18 11:44:11 (GMT) |
commit | 4a0d1e7c36f8ce2720fa6121b61bd048a87714ed (patch) | |
tree | 5e038d940e81ccf87d82c18eccf1a7ce89268c7f /Objects/odictobject.c | |
parent | 9a8b177e60cc5cc6d5105519c0df8fb185211e1d (diff) | |
download | cpython-4a0d1e7c36f8ce2720fa6121b61bd048a87714ed.zip cpython-4a0d1e7c36f8ce2720fa6121b61bd048a87714ed.tar.gz cpython-4a0d1e7c36f8ce2720fa6121b61bd048a87714ed.tar.bz2 |
odictobject.c: fix compiler warning
PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid
overflow.
Diffstat (limited to 'Objects/odictobject.c')
-rw-r--r-- | Objects/odictobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/odictobject.c b/Objects/odictobject.c index 104d6c1..7df419e 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -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); |