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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
9cdacc94
Commit
9cdacc94
authored
Oct 02, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup late includes.
parent
fc4bde50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-2
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-8
No files found.
Cython/Compiler/ModuleNode.py
View file @
9cdacc94
...
@@ -138,7 +138,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -138,7 +138,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
return_type
=
PyrexTypes
.
c_void_type
env
.
return_type
=
PyrexTypes
.
c_void_type
self
.
referenced_modules
=
[]
self
.
referenced_modules
=
[]
self
.
find_referenced_modules
(
env
,
self
.
referenced_modules
,
{})
self
.
find_referenced_modules
(
env
,
self
.
referenced_modules
,
{})
env
.
fixup_includes
()
self
.
sort_cdef_classes
(
env
)
self
.
sort_cdef_classes
(
env
)
self
.
generate_c_code
(
env
,
options
,
result
)
self
.
generate_c_code
(
env
,
options
,
result
)
self
.
generate_h_code
(
env
,
options
,
result
)
self
.
generate_h_code
(
env
,
options
,
result
)
...
@@ -739,7 +738,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -739,7 +738,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
early
:
if
early
:
includes
+=
env
.
include_files_early
includes
+=
env
.
include_files_early
if
late
:
if
late
:
includes
+=
env
.
include_files_late
includes
+=
[
include
for
include
in
env
.
include_files_late
if
include
not
in
env
.
include_files_early
]
for
filename
in
includes
:
for
filename
in
includes
:
byte_decoded_filenname
=
str
(
filename
)
byte_decoded_filenname
=
str
(
filename
)
...
...
Cython/Compiler/Symtab.py
View file @
9cdacc94
...
@@ -1253,7 +1253,7 @@ class ModuleScope(Scope):
...
@@ -1253,7 +1253,7 @@ class ModuleScope(Scope):
if
filename
in
self
.
python_include_files
:
if
filename
in
self
.
python_include_files
:
return
return
# Possibly, the same include appears both as early and as late
# Possibly, the same include appears both as early and as late
# include. We'll deal with this
in fixup_includes()
.
# include. We'll deal with this
at code generation time
.
if
late
:
if
late
:
incs
=
self
.
include_files_late
incs
=
self
.
include_files_late
else
:
else
:
...
@@ -1261,13 +1261,6 @@ class ModuleScope(Scope):
...
@@ -1261,13 +1261,6 @@ class ModuleScope(Scope):
if
filename
not
in
incs
:
if
filename
not
in
incs
:
incs
.
append
(
filename
)
incs
.
append
(
filename
)
def
fixup_includes
(
self
):
for
filename
in
self
.
include_files_early
:
try
:
self
.
include_files_late
.
remove
(
filename
)
except
ValueError
:
pass
def
add_imported_module
(
self
,
scope
):
def
add_imported_module
(
self
,
scope
):
if
scope
not
in
self
.
cimported_modules
:
if
scope
not
in
self
.
cimported_modules
:
for
filename
in
scope
.
include_files_early
:
for
filename
in
scope
.
include_files_early
:
...
...
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