sympy/sympy-incompatible-pointer....

39 lines
2.1 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fixes this error with GCC 14 and numpy 1.19.0 or later:
wrapper_module_15.c:32:60: error: initialization of void (*)(char **, const npy_intp *, const npy_intp *, void *) {aka void (*)(char **, const long int *, const long int *, void *)} from incompatible pointer type void (*)(char **, npy_intp *, npy_intp *, void *) {aka void (*)(char **, long int *, long int *, void *)}
32 | PyUFuncGenericFunction wrapped_281000935073472_funcs[1] = {&wrapped_281000935073472_ufunc};
| ^
error: command '/usr/bin/gcc' failed with exit code 1
--- sympy-sympy-1.12/sympy/utilities/autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/utilities/autowrap.py 2023-11-30 13:26:06.612852361 -0700
@@ -714,7 +714,7 @@ static PyMethodDef ${module}Methods[] =
_ufunc_outcalls = Template("*((double *)out${outnum}) = ${funcname}(${call_args});")
_ufunc_body = Template("""\
-static void ${funcname}_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void ${funcname}_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];
--- sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py.orig 2023-05-09 17:42:05.000000000 -0600
+++ sympy-sympy-1.12/sympy/utilities/tests/test_autowrap.py 2023-11-30 12:42:03.489842964 -0700
@@ -284,7 +284,7 @@ static PyMethodDef wrapper_module_%(num)
{NULL, NULL, 0, NULL}
};
-static void test_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void test_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];
@@ -378,7 +378,7 @@ static PyMethodDef wrapper_module_%(num)
{NULL, NULL, 0, NULL}
};
-static void multitest_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+static void multitest_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
{
npy_intp i;
npy_intp n = dimensions[0];