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.
This commit is contained in:
Brett Cannon 2023-03-31 14:23:55 -07:00 committed by GitHub
parent 361a3eaf1b
commit d97aef8ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 270 additions and 224 deletions

View file

@ -74,10 +74,56 @@ dummy_func(
PyObject **stack_pointer,
PyObject *kwnames,
int throwflag,
binaryfunc binary_ops[]
binaryfunc binary_ops[],
PyObject *args[]
)
{
// Dummy labels.
pop_1_error:
// Dummy locals.
PyObject *annotations;
PyObject *attrs;
PyObject *bottom;
PyObject *callable;
PyObject *callargs;
PyObject *closure;
PyObject *codeobj;
PyObject *cond;
PyObject *defaults;
PyObject *descr;
_PyInterpreterFrame entry_frame;
PyObject *exc;
PyObject *exit;
PyObject *fget;
PyObject *fmt_spec;
PyObject *func;
uint32_t func_version;
PyObject *getattribute;
PyObject *kwargs;
PyObject *kwdefaults;
PyObject *len_o;
PyObject *match;
PyObject *match_type;
PyObject *method;
PyObject *mgr;
Py_ssize_t min_args;
PyObject *names;
PyObject *new_exc;
PyObject *next;
PyObject *none;
PyObject *null;
PyObject *prev_exc;
PyObject *receiver;
PyObject *rest;
int result;
PyObject *self;
PyObject *seq;
PyObject *slice;
PyObject *step;
PyObject *subject;
PyObject *top;
PyObject *type;
int values_or_none;
switch (opcode) {