Kaydet (Commit) 1b0e4fcc authored tarafından Neil Schemenauer's avatar Neil Schemenauer

Use pymalloc for realloc() as well.

üst b26ca9db
...@@ -873,12 +873,12 @@ _PyObject_GC_Resize(PyVarObject *op, int nitems) ...@@ -873,12 +873,12 @@ _PyObject_GC_Resize(PyVarObject *op, int nitems)
const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems); const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems);
#ifdef WITH_CYCLE_GC #ifdef WITH_CYCLE_GC
PyGC_Head *g = AS_GC(op); PyGC_Head *g = AS_GC(op);
g = PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize); g = _PyMalloc_REALLOC(g, sizeof(PyGC_Head) + basicsize);
if (g == NULL) if (g == NULL)
return (PyVarObject *)PyErr_NoMemory(); return (PyVarObject *)PyErr_NoMemory();
op = (PyVarObject *) FROM_GC(g); op = (PyVarObject *) FROM_GC(g);
#else #else
op = PyObject_REALLOC(op, basicsize); op = _PyMalloc_REALLOC(op, basicsize);
if (op == NULL) if (op == NULL)
return (PyVarObject *)PyErr_NoMemory(); return (PyVarObject *)PyErr_NoMemory();
#endif #endif
......
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