Commit 3d5523b5 authored by Stefan Behnel's avatar Stefan Behnel

pass correct CythonScope into CythonUtilityScope tree generation (used to be None)

parent c541223a
...@@ -574,7 +574,7 @@ class GetAndReleaseBufferUtilityCode(object): ...@@ -574,7 +574,7 @@ class GetAndReleaseBufferUtilityCode(object):
def __hash__(self): def __hash__(self):
return 24342342 return 24342342
def get_tree(self): pass def get_tree(self, **kwargs): pass
def put_code(self, output): def put_code(self, output):
code = output['utility_code_def'] code = output['utility_code_def']
......
...@@ -318,7 +318,7 @@ class UtilityCodeBase(object): ...@@ -318,7 +318,7 @@ class UtilityCodeBase(object):
def __str__(self): def __str__(self):
return "<%s(%s)>" % (type(self).__name__, self.name) return "<%s(%s)>" % (type(self).__name__, self.name)
def get_tree(self): def get_tree(self, **kwargs):
pass pass
......
...@@ -127,7 +127,7 @@ def inject_utility_code_stage_factory(context): ...@@ -127,7 +127,7 @@ def inject_utility_code_stage_factory(context):
for dep in utilcode.requires: for dep in utilcode.requires:
if dep not in added and dep not in module_node.scope.utility_code_list: if dep not in added and dep not in module_node.scope.utility_code_list:
module_node.scope.utility_code_list.append(dep) module_node.scope.utility_code_list.append(dep)
tree = utilcode.get_tree() tree = utilcode.get_tree(cython_scope=context.cython_scope)
if tree: if tree:
module_node.merge_in(tree.body, tree.scope, merge_scope=True) module_node.merge_in(tree.body, tree.scope, merge_scope=True)
return module_node return module_node
......
...@@ -3202,7 +3202,7 @@ class ToPyStructUtilityCode(object): ...@@ -3202,7 +3202,7 @@ class ToPyStructUtilityCode(object):
def __hash__(self): def __hash__(self):
return hash(self.header) return hash(self.header)
def get_tree(self): def get_tree(self, **kwargs):
pass pass
def put_code(self, output): def put_code(self, output):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment