From 9205520d8c43488696d66cbdd9aefbb21871c508 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 8 Apr 2020 00:38:15 +0200 Subject: bpo-40170: PyObject_NEW() becomes an alias to PyObject_New() (GH-19379) The PyObject_NEW() macro becomes an alias to the PyObject_New() macro, and the PyObject_NEW_VAR() macro becomes an alias to the PyObject_NewVar() macro, to hide implementation details. They no longer access directly the PyTypeObject.tp_basicsize member. Exclude _PyObject_SIZE() and _PyObject_VAR_SIZE() macros from the limited C API. Replace PyObject_NEW() with PyObject_New() and replace PyObject_NEW_VAR() with PyObject_NewVar(). --- Objects/codeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/codeobject.c') diff --git a/Objects/codeobject.c b/Objects/codeobject.c index fd64393c23..1820d8c8a5 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -219,7 +219,7 @@ PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, cell2arg = NULL; } } - co = PyObject_NEW(PyCodeObject, &PyCode_Type); + co = PyObject_New(PyCodeObject, &PyCode_Type); if (co == NULL) { if (cell2arg) PyMem_FREE(cell2arg); -- cgit v1.2.1