diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-04-15 22:12:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-04-15 22:12:29 (GMT) |
commit | f303639e3ac96cfe6c1438f1c594226941f46216 (patch) | |
tree | c66297b58547aafe7df7333bdb183ef48eb2778a /Python/compile.c | |
parent | afbbac12a517818a1efa88f7bea18e82b68a79d4 (diff) | |
download | cpython-f303639e3ac96cfe6c1438f1c594226941f46216.zip cpython-f303639e3ac96cfe6c1438f1c594226941f46216.tar.gz cpython-f303639e3ac96cfe6c1438f1c594226941f46216.tar.bz2 |
bpo-33270: Intern names for all anonymous code objects (#6472)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c index 03b703d..62fe971 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4145,7 +4145,7 @@ compiler_genexp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString("<genexpr>"); + name = PyUnicode_InternFromString("<genexpr>"); if (!name) return 0; } @@ -4160,7 +4160,7 @@ compiler_listcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString("<listcomp>"); + name = PyUnicode_InternFromString("<listcomp>"); if (!name) return 0; } @@ -4175,7 +4175,7 @@ compiler_setcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString("<setcomp>"); + name = PyUnicode_InternFromString("<setcomp>"); if (!name) return 0; } @@ -4191,7 +4191,7 @@ compiler_dictcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString("<dictcomp>"); + name = PyUnicode_InternFromString("<dictcomp>"); if (!name) return 0; } |