Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f303639e
Commit
f303639e
authored
Apr 15, 2018
by
Zackery Spytz
Committed by
Serhiy Storchaka
Apr 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33270: Intern names for all anonymous code objects (#6472)
parent
afbbac12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
Misc/NEWS.d/next/Core and Builtins/2018-04-14-13-12-50.bpo-33270.UmVV6i.rst
...ore and Builtins/2018-04-14-13-12-50.bpo-33270.UmVV6i.rst
+1
-0
Python/compile.c
Python/compile.c
+4
-4
Python/importlib.h
Python/importlib.h
+1
-1
Python/importlib_external.h
Python/importlib_external.h
+3
-3
No files found.
Misc/NEWS.d/next/Core and Builtins/2018-04-14-13-12-50.bpo-33270.UmVV6i.rst
0 → 100644
View file @
f303639e
Intern the names for all anonymous code objects. Patch by Zackery Spytz.
Python/compile.c
View file @
f303639e
...
...
@@ -4145,7 +4145,7 @@ compiler_genexp(struct compiler *c, expr_ty e)
{
static
identifier
name
;
if
(
!
name
)
{
name
=
PyUnicode_FromString
(
"<genexpr>"
);
name
=
PyUnicode_
Intern
FromString
(
"<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_
Intern
FromString
(
"<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_
Intern
FromString
(
"<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_
Intern
FromString
(
"<dictcomp>"
);
if
(
!
name
)
return
0
;
}
...
...
Python/importlib.h
View file @
f303639e
...
...
@@ -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
,
2
50
,
9
,
60
,
103
,
101
,
110
,
101
,
120
,
112
,
114
,
62
,
65
,
1
,
0
,
0
,
0
,
2
18
,
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
,
...
...
Python/importlib_external.h
View file @
f303639e
...
...
@@ -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
,
2
50
,
10
,
60
,
108
,
105
,
115
,
116
,
99
,
111
,
109
,
112
,
62
,
58
,
0
,
0
,
0
,
2
18
,
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
,
2
50
,
9
,
110
,
97
,
109
,
101
,
114
,
2
,
0
,
0
,
0
,
114
,
4
,
0
,
0
,
0
,
2
18
,
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
,
2
50
,
9
,
60
,
115
,
101
,
0
,
114
,
2
,
0
,
0
,
0
,
114
,
4
,
0
,
0
,
0
,
2
18
,
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment