mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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:
parent
919d42d477
commit
8370e07e1e
20 changed files with 215 additions and 187 deletions
|
@ -32,7 +32,7 @@ parse_file(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
return PyErr_Format(PyExc_ValueError, "Bad mode, must be 0 <= mode <= 2");
|
||||
}
|
||||
|
||||
PyArena *arena = PyArena_New();
|
||||
PyArena *arena = _PyArena_New();
|
||||
if (arena == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ parse_file(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
|
||||
error:
|
||||
Py_XDECREF(filename_ob);
|
||||
PyArena_Free(arena);
|
||||
_PyArena_Free(arena);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ parse_string(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
return PyErr_Format(PyExc_ValueError, "Bad mode, must be 0 <= mode <= 2");
|
||||
}
|
||||
|
||||
PyArena *arena = PyArena_New();
|
||||
PyArena *arena = _PyArena_New();
|
||||
if (arena == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ parse_string(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
|
||||
error:
|
||||
Py_XDECREF(filename_ob);
|
||||
PyArena_Free(arena);
|
||||
_PyArena_Free(arena);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue