summaryrefslogtreecommitdiff
path: root/Cython/Compiler/MemoryView.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2011-11-14 21:40:32 +0100
committerStefan Behnel <stefan_ml@behnel.de>2011-11-14 21:40:32 +0100
commit1e5476fb361cd6928d11ee575573cf1910665698 (patch)
tree78abe4eb48c1dd36caeffbcd17c47fc4b49de34f /Cython/Compiler/MemoryView.py
parent0301ebf18ac3a0943078b87859c37f120e9b9504 (diff)
downloadcython-1e5476fb361cd6928d11ee575573cf1910665698.tar.gz
major cleanup refactoring of the utility code loading support,
simple support for loading requirements (at least from the same utility code type and file), caching support
Diffstat (limited to 'Cython/Compiler/MemoryView.py')
-rw-r--r--Cython/Compiler/MemoryView.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Cython/Compiler/MemoryView.py b/Cython/Compiler/MemoryView.py
index 9b7045810..5572fe1d1 100644
--- a/Cython/Compiler/MemoryView.py
+++ b/Cython/Compiler/MemoryView.py
@@ -2,7 +2,7 @@ from Errors import CompileError, error
import ExprNodes
from ExprNodes import IntNode, NameNode, AttributeNode
import Options
-from Code import UtilityCode
+from Code import UtilityCode, TempitaUtilityCode
from UtilityCode import CythonUtilityCode
import Buffer
import PyrexTypes
@@ -931,8 +931,11 @@ def load_memview_cy_utility(util_code_name, context=None, **kwargs):
context=context, **kwargs)
def load_memview_c_utility(util_code_name, context=None, **kwargs):
- return UtilityCode.load(util_code_name, "MemoryView_C.c",
- context=context, **kwargs)
+ if context is None:
+ return UtilityCode.load(util_code_name, "MemoryView_C.c", **kwargs)
+ else:
+ return TempitaUtilityCode.load(util_code_name, "MemoryView_C.c",
+ context=context, **kwargs)
def use_cython_array_utility_code(env):
env.global_scope().context.cython_scope.lookup('array_cwrapper').used = True