summaryrefslogtreecommitdiffstats
path: root/Python/flowgraph.c
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-01-29 23:04:34 (GMT)
committerGitHub <noreply@github.com>2024-01-29 23:04:34 (GMT)
commit8612230c1cacab6d48bfbeb9e17d04ef5a9acf21 (patch)
treebf514924f4e271505cfd154d14f9315931bfa199 /Python/flowgraph.c
parent3996cbdd33a479b7e59757b81489cbb3370f85e5 (diff)
downloadcpython-8612230c1cacab6d48bfbeb9e17d04ef5a9acf21.zip
cpython-8612230c1cacab6d48bfbeb9e17d04ef5a9acf21.tar.gz
cpython-8612230c1cacab6d48bfbeb9e17d04ef5a9acf21.tar.bz2
gh-114569: Use PyMem_* APIs for non-PyObjects in compiler (#114587)
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r--Python/flowgraph.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index 96610b3..bfc23a2 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -162,7 +162,7 @@ basicblock_last_instr(const basicblock *b) {
static basicblock *
cfg_builder_new_block(cfg_builder *g)
{
- basicblock *b = (basicblock *)PyObject_Calloc(1, sizeof(basicblock));
+ basicblock *b = (basicblock *)PyMem_Calloc(1, sizeof(basicblock));
if (b == NULL) {
PyErr_NoMemory();
return NULL;
@@ -437,10 +437,10 @@ _PyCfgBuilder_Free(cfg_builder *g)
basicblock *b = g->g_block_list;
while (b != NULL) {
if (b->b_instr) {
- PyObject_Free((void *)b->b_instr);
+ PyMem_Free((void *)b->b_instr);
}
basicblock *next = b->b_list;
- PyObject_Free((void *)b);
+ PyMem_Free((void *)b);
b = next;
}
PyMem_Free(g);