Commit 15e7065b authored by Bradley M. Froehle's avatar Bradley M. Froehle

Change __Pyx_zeros and __Pyx_minusones scope to static.

Compiling two Cython modules (which use the Cython buffer interface)
into a static Python binary results in a link error since the symbols
`__Pyx_zeros` and `__Pyx_minusones` are exported multiple times.  Changing
their scope to the current translation unit fixes the issue.
parent c8bf02a1
......@@ -484,8 +484,8 @@ def use_bufstruct_declare_code(env):
def get_empty_bufstruct_code(max_ndim):
code = dedent("""
Py_ssize_t __Pyx_zeros[] = {%s};
Py_ssize_t __Pyx_minusones[] = {%s};
static Py_ssize_t __Pyx_zeros[] = {%s};
static Py_ssize_t __Pyx_minusones[] = {%s};
""") % (", ".join(["0"] * max_ndim), ", ".join(["-1"] * max_ndim))
return UtilityCode(proto=code)
......
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