gh-132775: Add _PyCode_ReturnsOnlyNone() (gh-132981)
The function indicates whether or not the function has a return statement. This is used by a later change related treating some functions like scripts.
This commit is contained in:
@@ -295,7 +295,7 @@ dump_instr(cfg_instr *i)
|
||||
static inline int
|
||||
basicblock_returns(const basicblock *b) {
|
||||
cfg_instr *last = basicblock_last_instr(b);
|
||||
return last && last->i_opcode == RETURN_VALUE;
|
||||
return last && IS_RETURN_OPCODE(last->i_opcode);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user