Kaydet (Commit) 1aca78da authored tarafından Benjamin Peterson's avatar Benjamin Peterson

merge 3.3

...@@ -2043,7 +2043,7 @@ fail: ...@@ -2043,7 +2043,7 @@ fail:
if (keys != NULL) { if (keys != NULL) {
for (i = 0; i < saved_ob_size; i++) for (i = 0; i < saved_ob_size; i++)
Py_DECREF(keys[i]); Py_DECREF(keys[i]);
if (keys != &ms.temparray[saved_ob_size+1]) if (saved_ob_size >= MERGESTATE_TEMP_SIZE/2)
PyMem_FREE(keys); PyMem_FREE(keys);
} }
......
...@@ -37,8 +37,9 @@ Py_ssize_t quick_int_allocs, quick_neg_int_allocs; ...@@ -37,8 +37,9 @@ Py_ssize_t quick_int_allocs, quick_neg_int_allocs;
static PyObject * static PyObject *
get_small_int(sdigit ival) get_small_int(sdigit ival)
{ {
PyObject *v;
assert(-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS); assert(-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS);
PyObject *v = (PyObject *)&small_ints[ival + NSMALLNEGINTS]; v = (PyObject *)&small_ints[ival + NSMALLNEGINTS];
Py_INCREF(v); Py_INCREF(v);
#ifdef COUNT_ALLOCS #ifdef COUNT_ALLOCS
if (ival >= 0) if (ival >= 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment