summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-08-14 21:03:45 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-08-14 21:03:45 +0200
commit037bcf03aeaef706982f2d1711afaf148ca92cc4 (patch)
tree9c6b0a77d04616cc3e2af989c197425cad08ec16 /Cython/Compiler/ModuleNode.py
parent837841c2c432dbe9c4ef63452f2a114919e151fb (diff)
downloadcython-037bcf03aeaef706982f2d1711afaf148ca92cc4.tar.gz
Move PyFrame localsplus offset calculation to a more appropriate utility file where it can be included conditionally.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 5d41fe08c..98d9ebf7b 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -2357,7 +2357,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.use_utility_code(UtilityCode.load("CheckBinaryVersion", "ModuleSetupCode.c"))
code.put_error_if_neg(self.pos, "__Pyx_check_binary_version()")
+ code.putln("#ifdef __Pxy_PyFrame_Initialize_Offsets")
code.putln("__Pxy_PyFrame_Initialize_Offsets();")
+ code.putln("#endif")
code.putln("%s = PyTuple_New(0); %s" % (
Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos)))
code.putln("%s = PyBytes_FromStringAndSize(\"\", 0); %s" % (