Commit 315c20ef authored by Andrew V. Jones's avatar Andrew V. Jones Committed by Stefan Behnel

Only #define PY_SSIZE_T_CLEAN if it is not already #defined

Signed-off-by: default avatarAndrew V. Jones <andrew.jones@vector.com>
parent c0d5282d
......@@ -634,7 +634,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(json.dumps(metadata, indent=4, sort_keys=True))
code.putln("END: Cython Metadata */")
code.putln("")
code.putln("#ifndef PY_SSIZE_T_CLEAN")
code.putln("#define PY_SSIZE_T_CLEAN")
code.putln("#endif /* PY_SSIZE_T_CLEAN */")
for inc in sorted(env.c_includes.values(), key=IncludeCode.sortkey):
if inc.location == inc.INITIAL:
......
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