Commit f303639e authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

bpo-33270: Intern names for all anonymous code objects (#6472)

parent afbbac12
Intern the names for all anonymous code objects. Patch by Zackery Spytz.
......@@ -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;
}
......
......@@ -561,7 +561,7 @@ const unsigned char _Py_M__importlib[] = {
1,100,0,107,9,86,0,1,0,113,2,100,0,83,0,41,
1,78,114,10,0,0,0,41,2,90,2,46,48,90,3,97,
114,103,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
0,250,9,60,103,101,110,101,120,112,114,62,65,1,0,0,
0,218,9,60,103,101,110,101,120,112,114,62,65,1,0,0,
115,2,0,0,0,4,0,122,45,95,105,110,115,116,97,108,
108,101,100,95,115,97,102,101,108,121,46,95,95,101,120,105,
116,95,95,46,60,108,111,99,97,108,115,62,46,60,103,101,
......
......@@ -132,7 +132,7 @@ const unsigned char _Py_M__importlib_external[] = {
116,114,105,112,218,15,112,97,116,104,95,115,101,112,97,114,
97,116,111,114,115,41,2,218,2,46,48,218,4,112,97,114,
116,114,2,0,0,0,114,2,0,0,0,114,4,0,0,0,
250,10,60,108,105,115,116,99,111,109,112,62,58,0,0,0,
218,10,60,108,105,115,116,99,111,109,112,62,58,0,0,0,
115,2,0,0,0,6,1,122,30,95,112,97,116,104,95,106,
111,105,110,46,60,108,111,99,97,108,115,62,46,60,108,105,
115,116,99,111,109,112,62,41,2,218,8,112,97,116,104,95,
......@@ -1678,7 +1678,7 @@ const unsigned char _Py_M__importlib_external[] = {
2,86,0,1,0,113,2,100,1,83,0,41,2,114,186,0,
0,0,78,114,2,0,0,0,41,2,114,22,0,0,0,218,
6,115,117,102,102,105,120,41,1,218,9,102,105,108,101,95,
110,97,109,101,114,2,0,0,0,114,4,0,0,0,250,9,
110,97,109,101,114,2,0,0,0,114,4,0,0,0,218,9,
60,103,101,110,101,120,112,114,62,33,4,0,0,115,2,0,
0,0,4,1,122,49,69,120,116,101,110,115,105,111,110,70,
105,108,101,76,111,97,100,101,114,46,105,115,95,112,97,99,
......@@ -2350,7 +2350,7 @@ const unsigned char _Py_M__importlib_external[] = {
0,104,0,124,0,93,12,125,1,124,1,160,0,161,0,146,
2,113,4,83,0,114,2,0,0,0,41,1,114,90,0,0,
0,41,2,114,22,0,0,0,90,2,102,110,114,2,0,0,
0,114,2,0,0,0,114,4,0,0,0,250,9,60,115,101,
0,114,2,0,0,0,114,4,0,0,0,218,9,60,115,101,
116,99,111,109,112,62,153,5,0,0,115,2,0,0,0,6,
0,122,41,70,105,108,101,70,105,110,100,101,114,46,95,102,
105,108,108,95,99,97,99,104,101,46,60,108,111,99,97,108,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment