Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1007)

Unified Diff: Python/compile.c

Issue 13672: Add co_qualname attribute in code objects
Patch Set: Created 1 year, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Objects/codeobject.c ('k') | Python/frozen.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1571,8 +1571,8 @@ compiler_function(struct compiler *c, st
st = (stmt_ty)asdl_seq_GET(s->v.FunctionDef.body, i);
VISIT_IN_SCOPE(c, stmt, st);
}
+ qualname = compiler_scope_qualname(c);
co = assemble(c, 1);
- qualname = compiler_scope_qualname(c);
compiler_exit_scope(c);
if (qualname == NULL || co == NULL) {
Py_XDECREF(qualname);
@@ -1790,8 +1790,8 @@ compiler_lambda(struct compiler *c, expr
else {
ADDOP_IN_SCOPE(c, RETURN_VALUE);
}
+ qualname = compiler_scope_qualname(c);
co = assemble(c, 1);
- qualname = compiler_scope_qualname(c);
compiler_exit_scope(c);
if (qualname == NULL || co == NULL)
return 0;
@@ -3051,8 +3051,8 @@ compiler_comprehension(struct compiler *
ADDOP(c, RETURN_VALUE);
}
+ qualname = compiler_scope_qualname(c);
co = assemble(c, 1);
- qualname = compiler_scope_qualname(c);
compiler_exit_scope(c);
if (qualname == NULL || co == NULL)
goto error;
@@ -4113,7 +4113,7 @@ makecode(struct compiler *c, struct asse
freevars, cellvars,
c->c_filename_obj, c->u->u_name,
c->u->u_firstlineno,
- a->a_lnotab);
+ a->a_lnotab, c->u->u_qualname);
error:
Py_XDECREF(consts);
Py_XDECREF(names);
« no previous file with comments | « Objects/codeobject.c ('k') | Python/frozen.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7