MCPcopy Create free account
hub / github.com/bloomberg/pystack / isEntry

Method isEntry

src/pystack/_pystack/pyframe.cpp:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool
92FrameObject::isEntry(
93 const std::shared_ptr<const AbstractProcessManager>& manager,
94 Structure<py_frame_v>& frame)
95{
96 if (manager->versionIsAtLeast(3, 12)) {
97 // This is an entry frame if the previous frame was a shim, or if
98 // this is the most recent frame and is itself a shim (meaning that
99 // the entry frame this shim was created for hasn't been pushed yet,
100 // so the latest _PyEval_EvalFrameDefault call has no Python frames).
101 return (d_prev && d_prev->d_is_shim) || (d_frame_no == 0 && d_is_shim);
102 } else if (manager->versionIsAtLeast(3, 11)) {
103 // This is an entry frame if it has an entry flag set.
104 return frame.getField(&py_frame_v::o_is_entry);
105 }
106 return true;
107}
108
109void
110FrameObject::resolveLocalVariables()

Callers

nothing calls this directly

Calls 1

versionIsAtLeastMethod · 0.80

Tested by

no test coverage detected