summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-03-24 01:23:01 (GMT)
committerGitHub <noreply@github.com>2021-03-24 01:23:01 (GMT)
commit8370e07e1e5b626e78ddc7aadbfaf248976c4454 (patch)
tree5ad56b80064a2e282bfd77442096ffab167de9ed /Tools/peg_generator
parent919d42d477093154a30b55d9d79f023dbbe5614a (diff)
downloadcpython-8370e07e1e5b626e78ddc7aadbfaf248976c4454.zip
cpython-8370e07e1e5b626e78ddc7aadbfaf248976c4454.tar.gz
cpython-8370e07e1e5b626e78ddc7aadbfaf248976c4454.tar.bz2
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()
Diffstat (limited to 'Tools/peg_generator')
-rw-r--r--Tools/peg_generator/peg_extension/peg_extension.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/peg_generator/peg_extension/peg_extension.c b/Tools/peg_generator/peg_extension/peg_extension.c
index 209a34c..94e729e 100644
--- a/Tools/peg_generator/peg_extension/peg_extension.c
+++ b/Tools/peg_generator/peg_extension/peg_extension.c
@@ -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;
}