summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index d92a9c5..d00a7a0 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5,6 +5,7 @@
#include "Python.h"
#include "pycore_bitutils.h" // _Py_popcount32()
#include "pycore_interp.h" // _PY_NSMALLPOSINTS
+#include "pycore_object.h" // _PyObject_InitVar()
#include "pycore_pystate.h" // _Py_IsMainInterpreter()
#include "longintrepr.h"
@@ -146,7 +147,8 @@ _PyLong_New(Py_ssize_t size)
PyErr_NoMemory();
return NULL;
}
- return (PyLongObject*)PyObject_INIT_VAR(result, &PyLong_Type, size);
+ _PyObject_InitVar((PyVarObject*)result, &PyLong_Type, size);
+ return result;
}
PyObject *