Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2a8dd0c0
Commit
2a8dd0c0
authored
Sep 22, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude 'const' globals from star-importing since they can't get assigned anyway.
Closes #2621.
parent
1644e44c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
CHANGES.rst
CHANGES.rst
+4
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
No files found.
CHANGES.rst
View file @
2a8dd0c0
...
...
@@ -105,6 +105,10 @@ Bugs fixed
* Generator expressions and lambdas failed to compile in ``@cfunc`` functions.
(Github issue #459)
* Global names with ``const`` types were not excluded from star-import assignments
which could lead to invalid C code.
(Github issue #2621)
* Several internal function signatures were fixed that lead to warnings in gcc-8.
(Github issue #2363)
...
...
Cython/Compiler/ModuleNode.py
View file @
2a8dd0c0
...
...
@@ -2238,7 +2238,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"if (0);"
)
# so the first one can be "else if"
msvc_count
=
0
for
name
,
entry
in
sorted
(
env
.
entries
.
items
()):
if
entry
.
is_cglobal
and
entry
.
used
:
if
entry
.
is_cglobal
and
entry
.
used
and
not
entry
.
type
.
is_const
:
msvc_count
+=
1
if
msvc_count
%
100
==
0
:
code
.
putln
(
"#ifdef _MSC_VER"
)
...
...
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