Skip to content
Merged
Prev Previous commit
Next Next commit
inline new_basicblock - it's called in onyl one place now and it's no…
…t safe to call from elsewhere
  • Loading branch information
iritkatriel committed Jul 25, 2022
commit 1e7d1df5ef9204869b3a1da236c4d9c623e12356
12 changes: 1 addition & 11 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,23 +843,13 @@ compiler_set_qualname(struct compiler *c)
Returns NULL on error.
*/
static basicblock *
new_basicblock()
cfg_new_block(cfg *g)
{
basicblock *b = (basicblock *)PyObject_Calloc(1, sizeof(basicblock));
if (b == NULL) {
PyErr_NoMemory();
return NULL;
}
return b;
}

static basicblock *
cfg_new_block(cfg *g)
{
basicblock *b = new_basicblock();
if (b == NULL) {
return NULL;
}
/* Extend the singly linked list of blocks with new block. */
b->b_list = g->block_list;
g->block_list = b;
Expand Down