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
60e419e6
Commit
60e419e6
authored
Sep 03, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple of tests due to utility code changes.
parent
96eea730
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+1
-0
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+3
-1
Cython/Compiler/UtilityCode.py
Cython/Compiler/UtilityCode.py
+3
-1
No files found.
Cython/Compiler/Code.py
View file @
60e419e6
...
...
@@ -553,6 +553,7 @@ class LazyUtilityCode(UtilityCodeBase):
Utility code that calls a callback with the root code writer when
available. Useful when you only have '
env
' but not '
code
'.
"""
__name__ = '
<
lazy
>
'
def __init__(self, callback):
self.callback = callback
...
...
Cython/Compiler/Pipeline.py
View file @
60e419e6
...
...
@@ -87,8 +87,10 @@ def sort_utility_codes(utilcodes):
ranks
[
utilcode
]
=
0
ranks
[
utilcode
]
=
1
+
min
([
get_rank
(
dep
)
for
dep
in
utilcode
.
requires
or
()]
or
[
-
1
])
return
ranks
[
utilcode
]
for
utilcode
in
utilcodes
:
for
ix
,
utilcode
in
enumerate
(
utilcodes
)
:
get_rank
(
utilcode
)
# Bias towards original order.
ranks
[
utilcode
]
-=
ix
*
1e-10
return
[
utilcode
for
utilcode
,
_
in
sorted
(
ranks
.
items
(),
key
=
lambda
kv
:
kv
[
1
])]
def
normalize_deps
(
utilcodes
):
...
...
Cython/Compiler/UtilityCode.py
View file @
60e419e6
...
...
@@ -147,7 +147,9 @@ class CythonUtilityCode(Code.UtilityCodeBase):
before
=
transform
)
for
dep
in
self
.
requires
:
if
isinstance
(
dep
,
CythonUtilityCode
):
if
(
isinstance
(
dep
,
CythonUtilityCode
)
and
hasattr
(
dep
,
'tree'
)
and
not
cython_scope
):
def
scope_transform
(
module_node
):
module_node
.
scope
.
merge_in
(
dep
.
tree
.
scope
)
return
module_node
...
...
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