From f303639e3ac96cfe6c1438f1c594226941f46216 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Sun, 15 Apr 2018 16:12:29 -0600 Subject: bpo-33270: Intern names for all anonymous code objects (#6472) --- Python/compile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Python/compile.c') 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(""); + name = PyUnicode_InternFromString(""); if (!name) return 0; } @@ -4160,7 +4160,7 @@ compiler_listcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString(""); + name = PyUnicode_InternFromString(""); if (!name) return 0; } @@ -4175,7 +4175,7 @@ compiler_setcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString(""); + name = PyUnicode_InternFromString(""); if (!name) return 0; } @@ -4191,7 +4191,7 @@ compiler_dictcomp(struct compiler *c, expr_ty e) { static identifier name; if (!name) { - name = PyUnicode_FromString(""); + name = PyUnicode_InternFromString(""); if (!name) return 0; } -- cgit v1.2.1