diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-03-15 02:47:36 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-03-15 02:47:36 (GMT) |
commit | dfa822811a1a39cbf7cefc747b7b642a6c6e1357 (patch) | |
tree | 4a834ea6280068a53434469df4949b599fa7d6f2 | |
parent | bdc4b02985e5d50301c554cb58b7f0ad24b1f68b (diff) | |
parent | 041c38a790cb9ce14742765e3314d90a7c601809 (diff) | |
download | cpython-dfa822811a1a39cbf7cefc747b7b642a6c6e1357.zip cpython-dfa822811a1a39cbf7cefc747b7b642a6c6e1357.tar.gz cpython-dfa822811a1a39cbf7cefc747b7b642a6c6e1357.tar.bz2 |
merge 3.3
-rw-r--r-- | Objects/longobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 9411216..fb47c70 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -37,7 +37,8 @@ Py_ssize_t quick_int_allocs, quick_neg_int_allocs; static PyObject * get_small_int(sdigit ival) { - PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS); + assert(-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS); + PyObject *v = (PyObject *)&small_ints[ival + NSMALLNEGINTS]; Py_INCREF(v); #ifdef COUNT_ALLOCS if (ival >= 0) |