summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-09-06 12:37:32 +0200
committerStefan Behnel <stefan_ml@behnel.de>2019-10-08 22:33:33 +0200
commit5b396db0a7c9b10c7418223357e87b95b009b70b (patch)
treed8e053fc6c90d7884b19d92a73289e5a7778f35e
parent3c059640231558d62c3ef92a93e73c923ccf6fea (diff)
downloadcython-5b396db0a7c9b10c7418223357e87b95b009b70b.tar.gz
Make sure to include "Python.h" also from the "public" header file, which depends on its declarations.
Closes #3133.
-rw-r--r--Cython/Compiler/ModuleNode.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index ece046f97..13c1aa6eb 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -176,6 +176,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
h_guard = Naming.h_guard_prefix + self.api_name(env)
h_code.put_h_guard(h_guard)
h_code.putln("")
+ h_code.putln('#include "Python.h"')
self.generate_type_header_code(h_types, h_code)
if options.capi_reexport_cincludes:
self.generate_includes(env, [], h_code)