GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Stackless issue #272: convert macro HANDLE_UNWINDING to a function · akruis/cpython@f730a4e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Python
    • ceval.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Python/ceval.c‎

Copy file name to clipboardExpand all lines: Python/ceval.c
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,9 @@ do { \
615615
assert(SLP_FRAME_EXECUTING_VALUE == f->f_executing); \
616616
if (frame_func != SLP_FRAME_EXECUTING_VALUE) { \
617617
f->f_executing = (frame_func); \
618+
/* check argument: must be an executing frame with retval */ \
619+
assert(frame_func != SLP_FRAME_EXECUTING_NOVAL); \
620+
assert(SLP_FRAME_IS_EXECUTING(f)); \
618621
} \
619622
/* keep the reference to the frame to be called. */ \
620623
f->f_stacktop = stack_pointer; \
@@ -3840,11 +3843,15 @@ handle_unwinding(int lineno, PyFrameObject *f,
38403843
const _Py_CODEUNIT *first_instr, const _Py_CODEUNIT *next_instr,
38413844
char frame_func, int has_opcode, PyObject **pretval)
38423845
{
3846+
assert(*pretval); /* check argument */
38433847
if (has_opcode)
38443848
next_instr -= 1 + EXTENDED_ARG_OFFSET(oparg);
38453849
assert(SLP_FRAME_EXECUTING_VALUE == f->f_executing);
38463850
if (frame_func != SLP_FRAME_EXECUTING_VALUE) {
38473851
f->f_executing = frame_func;
3852+
/* check argument: must be an executing frame with retval */
3853+
assert(frame_func != SLP_FRAME_EXECUTING_NOVAL);
3854+
assert(SLP_FRAME_IS_EXECUTING(f));
38483855
}
38493856
/* keep the reference to the frame to be called. */
38503857
f->f_stacktop = stack_pointer;

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.