Commit 017075a1 authored by Stefan Behnel's avatar Stefan Behnel

Remove incorrect error handling in limited-api case.

parent ae9ee53c
...@@ -3173,6 +3173,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -3173,6 +3173,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.method_table_cname, env.method_table_cname,
doc, doc,
env.module_cname)) env.module_cname))
code.putln(code.error_goto_if_null(env.module_cname, self.pos))
code.putln("#elif CYTHON_COMPILING_IN_LIMITED_API") code.putln("#elif CYTHON_COMPILING_IN_LIMITED_API")
module_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) module_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True)
code.putln( code.putln(
...@@ -3190,8 +3191,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -3190,8 +3191,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
"%s = PyModule_Create(&%s);" % ( "%s = PyModule_Create(&%s);" % (
env.module_cname, env.module_cname,
Naming.pymoduledef_cname)) Naming.pymoduledef_cname))
code.putln("#endif")
code.putln(code.error_goto_if_null(env.module_cname, self.pos)) code.putln(code.error_goto_if_null(env.module_cname, self.pos))
code.putln("#endif")
code.putln("#endif") # CYTHON_PEP489_MULTI_PHASE_INIT code.putln("#endif") # CYTHON_PEP489_MULTI_PHASE_INIT
code.putln("#if !CYTHON_COMPILING_IN_LIMITED_API") code.putln("#if !CYTHON_COMPILING_IN_LIMITED_API")
......
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