bpo-43244: Remove the pyarena.h header (GH-25007)
Remove the pyarena.h header file with functions: * PyArena_New() * PyArena_Free() * PyArena_Malloc() * PyArena_AddPyObject() These functions were undocumented, excluded from the limited C API, and were only used internally by the compiler. Add pycore_pyarena.h header. Rename functions: * PyArena_New() => _PyArena_New() * PyArena_Free() => _PyArena_Free() * PyArena_Malloc() => _PyArena_Malloc() * PyArena_AddPyObject() => _PyArena_AddPyObject()
This commit is contained in:
@@ -1972,16 +1972,16 @@ _Py_SymtableStringObjectFlags(const char *str, PyObject *filename,
|
||||
mod_ty mod;
|
||||
PyArena *arena;
|
||||
|
||||
arena = PyArena_New();
|
||||
arena = _PyArena_New();
|
||||
if (arena == NULL)
|
||||
return NULL;
|
||||
|
||||
mod = _PyParser_ASTFromString(str, filename, start, flags, arena);
|
||||
if (mod == NULL) {
|
||||
PyArena_Free(arena);
|
||||
_PyArena_Free(arena);
|
||||
return NULL;
|
||||
}
|
||||
st = _PySymtable_Build(mod, filename, 0);
|
||||
PyArena_Free(arena);
|
||||
_PyArena_Free(arena);
|
||||
return st;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user