summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index a7ddc5a..57a2329 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1533,8 +1533,14 @@ compiler_visit_argannotation(struct compiler *c, identifier id,
{
if (annotation) {
VISIT(c, expr, annotation);
- if (PyList_Append(names, id))
+ PyObject *mangled = _Py_Mangle(c->u->u_private, id);
+ if (!mangled)
return -1;
+ if (PyList_Append(names, mangled) < 0) {
+ Py_DECREF(mangled);
+ return -1;
+ }
+ Py_DECREF(mangled);
}
return 0;
}