mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)
Add new frame owner type for interpreter entry frames
This commit is contained in:
parent
d3b1bb228c
commit
f5b6356a11
13 changed files with 33 additions and 48 deletions
|
@ -99,7 +99,7 @@ Py_TPFLAGS_BASE_EXC_SUBCLASS = (1 << 30)
|
|||
Py_TPFLAGS_TYPE_SUBCLASS = (1 << 31)
|
||||
|
||||
#From pycore_frame.h
|
||||
FRAME_OWNED_BY_CSTACK = 3
|
||||
FRAME_OWNED_BY_INTERPRETER = 3
|
||||
|
||||
MAX_OUTPUT_LEN=1024
|
||||
|
||||
|
@ -1113,7 +1113,7 @@ class PyFramePtr:
|
|||
return int(instr_ptr - first_instr)
|
||||
|
||||
def is_shim(self):
|
||||
return self._f_special("owner", int) == FRAME_OWNED_BY_CSTACK
|
||||
return self._f_special("owner", int) == FRAME_OWNED_BY_INTERPRETER
|
||||
|
||||
def previous(self):
|
||||
return self._f_special("previous", PyFramePtr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue