Commit 02e2a703 authored by Stefan Behnel's avatar Stefan Behnel

honour 'nonecheck' option in NoneCheckNode

parent 15b79e21
...@@ -7506,6 +7506,8 @@ class NoneCheckNode(CoercionNode): ...@@ -7506,6 +7506,8 @@ class NoneCheckNode(CoercionNode):
return self.arg.result() return self.arg.result()
def generate_result_code(self, code): def generate_result_code(self, code):
if not code.globalstate.directives['nonecheck']:
return
code.putln( code.putln(
"if (unlikely(%s == Py_None)) {" % self.arg.result()) "if (unlikely(%s == Py_None)) {" % self.arg.result())
code.putln('PyErr_SetString(%s, "%s"); %s ' % ( code.putln('PyErr_SetString(%s, "%s"); %s ' % (
......
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