diff options
author | shadchin <[email protected]> | 2023-07-22 00:59:02 +0300 |
---|---|---|
committer | shadchin <[email protected]> | 2023-07-22 00:59:02 +0300 |
commit | 7ecf6c16ab762d4ed40a90ea329eebeb1b8cbca0 (patch) | |
tree | 13f625aacca47c9885d8fa31ba97151706ef63bd /contrib/tools/cython/Cython/Compiler/Nodes.py | |
parent | 91a8278c558cb2002069ca54215c83568ba6826e (diff) |
Update Cython to 0.29.36
Diffstat (limited to 'contrib/tools/cython/Cython/Compiler/Nodes.py')
-rw-r--r-- | contrib/tools/cython/Cython/Compiler/Nodes.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/tools/cython/Cython/Compiler/Nodes.py b/contrib/tools/cython/Cython/Compiler/Nodes.py index f57ddf3dd34..db5d6578297 100644 --- a/contrib/tools/cython/Cython/Compiler/Nodes.py +++ b/contrib/tools/cython/Cython/Compiler/Nodes.py @@ -6215,8 +6215,10 @@ class AssertStatNode(StatNode): gil_message = "Raising exception" def generate_execution_code(self, code): + code.globalstate.use_utility_code( + UtilityCode.load_cached("AssertionsEnabled", "Exceptions.c")) code.putln("#ifndef CYTHON_WITHOUT_ASSERTIONS") - code.putln("if (unlikely(!Py_OptimizeFlag)) {") + code.putln("if (unlikely(__pyx_assertions_enabled())) {") code.mark_pos(self.pos) self.cond.generate_evaluation_code(code) code.putln( |