From 8370e07e1e5b626e78ddc7aadbfaf248976c4454 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 24 Mar 2021 02:23:01 +0100 Subject: 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() --- Python/bltinmodule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index afe0f820cf..d08e9a3326 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -828,21 +828,21 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename, PyArena *arena; mod_ty mod; - arena = PyArena_New(); + arena = _PyArena_New(); if (arena == NULL) goto error; mod = PyAST_obj2mod(source, arena, compile_mode); if (mod == NULL) { - PyArena_Free(arena); + _PyArena_Free(arena); goto error; } if (!_PyAST_Validate(mod)) { - PyArena_Free(arena); + _PyArena_Free(arena); goto error; } result = (PyObject*)_PyAST_Compile(mod, filename, &cf, optimize, arena); - PyArena_Free(arena); + _PyArena_Free(arena); } goto finally; } -- cgit v1.2.1