Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5cb836 commit 041c38aCopy full SHA for 041c38a
1 file changed
Objects/longobject.c
@@ -36,7 +36,8 @@ Py_ssize_t quick_int_allocs, quick_neg_int_allocs;
36
static PyObject *
37
get_small_int(sdigit ival)
38
{
39
- PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS);
+ assert(-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS);
40
+ PyObject *v = (PyObject *)&small_ints[ival + NSMALLNEGINTS];
41
Py_INCREF(v);
42
#ifdef COUNT_ALLOCS
43
if (ival >= 0)
0 commit comments