summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-04-15 16:12:29 -0600
committerSerhiy Storchaka <storchaka@gmail.com>2018-04-16 01:12:29 +0300
commitf303639e3ac96cfe6c1438f1c594226941f46216 (patch)
treec66297b58547aafe7df7333bdb183ef48eb2778a /Python/compile.c
parentafbbac12a517818a1efa88f7bea18e82b68a79d4 (diff)
downloadcpython-git-f303639e3ac96cfe6c1438f1c594226941f46216.tar.gz
bpo-33270: Intern names for all anonymous code objects (#6472)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 03b703deb0..62fe971739 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;
}