Skip to content

Commit d97aef8

Browse files
authored
Add missing variables to bytecodes.c (GH-103153)
The code works without this change, but it does cause C tooling to complain less about undeclared variables.
1 parent 361a3ea commit d97aef8

File tree

2 files changed

+270
-224
lines changed

2 files changed

+270
-224
lines changed

Python/bytecodes.c

+47-1
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,56 @@ dummy_func(
7474
PyObject **stack_pointer,
7575
PyObject *kwnames,
7676
int throwflag,
77-
binaryfunc binary_ops[]
77+
binaryfunc binary_ops[],
78+
PyObject *args[]
7879
)
7980
{
81+
// Dummy labels.
82+
pop_1_error:
83+
// Dummy locals.
84+
PyObject *annotations;
85+
PyObject *attrs;
86+
PyObject *bottom;
87+
PyObject *callable;
88+
PyObject *callargs;
89+
PyObject *closure;
90+
PyObject *codeobj;
91+
PyObject *cond;
92+
PyObject *defaults;
93+
PyObject *descr;
8094
_PyInterpreterFrame entry_frame;
95+
PyObject *exc;
96+
PyObject *exit;
97+
PyObject *fget;
98+
PyObject *fmt_spec;
99+
PyObject *func;
100+
uint32_t func_version;
101+
PyObject *getattribute;
102+
PyObject *kwargs;
103+
PyObject *kwdefaults;
104+
PyObject *len_o;
105+
PyObject *match;
106+
PyObject *match_type;
107+
PyObject *method;
108+
PyObject *mgr;
109+
Py_ssize_t min_args;
110+
PyObject *names;
111+
PyObject *new_exc;
112+
PyObject *next;
113+
PyObject *none;
114+
PyObject *null;
115+
PyObject *prev_exc;
116+
PyObject *receiver;
117+
PyObject *rest;
118+
int result;
119+
PyObject *self;
120+
PyObject *seq;
121+
PyObject *slice;
122+
PyObject *step;
123+
PyObject *subject;
124+
PyObject *top;
125+
PyObject *type;
126+
int values_or_none;
81127

82128
switch (opcode) {
83129

0 commit comments

Comments
 (0)