diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-17 23:54:35 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-17 23:54:35 (GMT) |
commit | 2a1fdc4c760bf862accf625558e9bf54b9b9cd7c (patch) | |
tree | 86069f9cb1c3d0b9f74f9d3d3c6771dc64e8f833 /Python/compile.c | |
parent | 64befe939c1da377053f6a410f082db02184c5e2 (diff) | |
parent | 32c59b6fc1140486a9915876054365b40bd88da9 (diff) | |
download | cpython-2a1fdc4c760bf862accf625558e9bf54b9b9cd7c.zip cpython-2a1fdc4c760bf862accf625558e9bf54b9b9cd7c.tar.gz cpython-2a1fdc4c760bf862accf625558e9bf54b9b9cd7c.tar.bz2 |
merge 3.2 (#14607)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 1722a5f..79d1d21 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1409,7 +1409,11 @@ compiler_visit_kwonlydefaults(struct compiler *c, asdl_seq *kwonlyargs, arg_ty arg = asdl_seq_GET(kwonlyargs, i); expr_ty default_ = asdl_seq_GET(kw_defaults, i); if (default_) { - ADDOP_O(c, LOAD_CONST, arg->arg, consts); + PyObject *mangled = _Py_Mangle(c->u->u_private, arg->arg); + if (!mangled) + return -1; + ADDOP_O(c, LOAD_CONST, mangled, consts); + Py_DECREF(mangled); if (!compiler_visit_expr(c, default_)) { return -1; } |