blob: acfd1896a1041144fe8ce6483e9d75c3e1a7423b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -2036,7 +2036,7 @@
if (keys != NULL) {
for (i = 0; i < saved_ob_size; i++)
Py_DECREF(keys[i]);
- if (keys != &ms.temparray[saved_ob_size+1])
+ if (keys != ((char *) ms.temparray) + (saved_ob_size+1) * sizeof (PyObject *))
PyMem_FREE(keys);
}
--- Objects/longobject.c
+++ Objects/longobject.c
@@ -36,7 +36,7 @@
static PyObject *
get_small_int(sdigit ival)
{
- PyObject *v = (PyObject*)(small_ints + ival + NSMALLNEGINTS);
+ PyObject *v = (PyObject*)(small_ints + (ival + NSMALLNEGINTS));
Py_INCREF(v);
#ifdef COUNT_ALLOCS
if (ival >= 0)
|