summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-11 21:09:40 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-11 21:32:34 +0200
commit017075a115314d39982dea493fc139ac1e4c5925 (patch)
treeae870bcf4b49dccf54306bba546fe927487ec961
parentae9ee53c7a1c3682cd5d8ef1cabc54203e867419 (diff)
downloadcython-017075a115314d39982dea493fc139ac1e4c5925.tar.gz
Remove incorrect error handling in limited-api case.
-rw-r--r--Cython/Compiler/ModuleNode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 9b545042c..19e28a8ba 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -3173,6 +3173,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.method_table_cname,
doc,
env.module_cname))
+ code.putln(code.error_goto_if_null(env.module_cname, self.pos))
code.putln("#elif CYTHON_COMPILING_IN_LIMITED_API")
module_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True)
code.putln(
@@ -3190,8 +3191,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
"%s = PyModule_Create(&%s);" % (
env.module_cname,
Naming.pymoduledef_cname))
- code.putln("#endif")
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("#if !CYTHON_COMPILING_IN_LIMITED_API")