Commit 8c18f258 authored by Tim Peters's avatar Tim Peters

_PyObject_GC_Malloc(): split a complicated line in two. As is, there was

no way to talk the debugger into showing me how many bytes were being
allocated.
parent 8c2c3d30
...@@ -802,8 +802,9 @@ _PyObject_GC_Malloc(PyTypeObject *tp, int size) ...@@ -802,8 +802,9 @@ _PyObject_GC_Malloc(PyTypeObject *tp, int size)
{ {
PyObject *op; PyObject *op;
#ifdef WITH_CYCLE_GC #ifdef WITH_CYCLE_GC
PyGC_Head *g = PyObject_MALLOC(_PyObject_VAR_SIZE(tp, size) + const size_t nbytes = sizeof(PyGC_Head) +
sizeof(PyGC_Head)); (size_t)_PyObject_VAR_SIZE(tp, size);
PyGC_Head *g = PyObject_MALLOC(nbytes);
if (g == NULL) if (g == NULL)
return (PyObject *)PyErr_NoMemory(); return (PyObject *)PyErr_NoMemory();
g->gc_next = NULL; g->gc_next = NULL;
......
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