by external AST optimizers, but the compiler does not emit directly such
node.
+- Issue #23601: Sped-up allocation of dict key objects by using Python's
+ small object allocator. (Contributed by Julian Taylor.)
+
- Issue #18018: Import raises ImportError instead of SystemError if a relative
import is attempted without a known parent package.
assert(size >= PyDict_MINSIZE_SPLIT);
assert(IS_POWER_OF_2(size));
- dk = PyMem_MALLOC(sizeof(PyDictKeysObject) +
+ dk = PyObject_MALLOC(sizeof(PyDictKeysObject) +
sizeof(PyDictKeyEntry) * (size-1));
if (dk == NULL) {
PyErr_NoMemory();
Py_XDECREF(entries[i].me_key);
Py_XDECREF(entries[i].me_value);
}
- PyMem_FREE(keys);
+ PyObject_FREE(keys);
}
#define new_values(size) PyMem_NEW(PyObject *, size)
}
}
assert(oldkeys->dk_refcnt == 1);
- DK_DEBUG_DECREF PyMem_FREE(oldkeys);
+ DK_DEBUG_DECREF PyObject_FREE(oldkeys);
}
return 0;
}