summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c
index e5e4bc5..1feb97c 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1195,7 +1195,7 @@ stack_effect(int opcode, int oparg, int jump)
case CALL_FUNCTION_EX:
return -1 - ((oparg & 0x01) != 0);
case MAKE_FUNCTION:
- return -1 - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0) -
+ return 0 - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0) -
((oparg & 0x04) != 0) - ((oparg & 0x08) != 0);
case BUILD_SLICE:
if (oparg == 3)
@@ -2138,7 +2138,6 @@ compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags,
ADDOP_I(c, BUILD_TUPLE, co->co_nfreevars);
}
ADDOP_LOAD_CONST(c, (PyObject*)co);
- ADDOP_LOAD_CONST(c, qualname);
ADDOP_I(c, MAKE_FUNCTION, flags);
return 1;
}
@@ -7389,7 +7388,6 @@ makecode(struct compiler *c, struct assembler *a, PyObject *constslist,
PyObject *consts = NULL;
PyObject *localsplusnames = NULL;
PyObject *localspluskinds = NULL;
- PyObject *name = NULL;
names = dict_keys_inorder(c->u->u_names, 0);
if (!names) {
@@ -7433,6 +7431,7 @@ makecode(struct compiler *c, struct assembler *a, PyObject *constslist,
struct _PyCodeConstructor con = {
.filename = c->c_filename,
.name = c->u->u_name,
+ .qualname = c->u->u_qualname ? c->u->u_qualname : c->u->u_name,
.flags = flags,
.code = a->a_bytecode,
@@ -7475,7 +7474,6 @@ makecode(struct compiler *c, struct assembler *a, PyObject *constslist,
Py_XDECREF(consts);
Py_XDECREF(localsplusnames);
Py_XDECREF(localspluskinds);
- Py_XDECREF(name);
return co;
}