mirror of
https://github.com/python/cpython.git
synced 2026-06-05 01:10:53 +00:00
gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625)
This commit is contained in:
parent
2531cd337b
commit
39bd44fc70
12 changed files with 96 additions and 43 deletions
|
|
@ -1974,7 +1974,7 @@ dummy_func(
|
|||
inst(LOAD_COMMON_CONSTANT, ( -- value)) {
|
||||
// Keep in sync with _common_constants in opcode.py
|
||||
assert(oparg < NUM_COMMON_CONSTANTS);
|
||||
value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]);
|
||||
value = PyStackRef_DupImmortal(tstate->interp->common_consts[oparg]);
|
||||
}
|
||||
|
||||
inst(LOAD_BUILD_CLASS, ( -- bc)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue