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
Kirill Smelkov
cython
Commits
bf2cf6fd
Commit
bf2cf6fd
authored
Jan 24, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix transitive loading of parametrised utility code
parent
feefc031
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+9
-4
No files found.
Cython/Compiler/Code.py
View file @
bf2cf6fd
...
...
@@ -249,8 +249,13 @@ class UtilityCodeBase(object):
continue
# only pass lists when we have to: most argument expect one value or None
if name == 'requires':
values = [cls.load_cached(dep, from_file, **orig_kwargs)
for dep in sorted(values)]
if orig_kwargs:
values = [cls.load(dep, from_file, **orig_kwargs)
for dep in sorted(values)]
else:
# dependencies are rarely unique, so use load_cached() when we can
values = [cls.load_cached(dep, from_file)
for dep in sorted(values)]
elif not values:
values = None
elif len(values) == 1:
...
...
@@ -270,7 +275,7 @@ class UtilityCodeBase(object):
return cls(**kwargs)
@classmethod
def load_cached(cls, utility_code_name, from_file=None, __cache={}
, **kwargs
):
def load_cached(cls, utility_code_name, from_file=None, __cache={}):
"""
Calls .load(), but using a per-type cache based on utility name and file name.
"""
...
...
@@ -279,7 +284,7 @@ class UtilityCodeBase(object):
return __cache[key]
except KeyError:
pass
code = __cache[key] = cls.load(utility_code_name, from_file
, **kwargs
)
code = __cache[key] = cls.load(utility_code_name, from_file)
return code
@classmethod
...
...
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