summaryrefslogtreecommitdiff
path: root/dev-python/sympy/files/sympy-1.12-c99.patch
blob: 311311cfcea36ec9cb1f3322a07c1f289d2628d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
https://github.com/sympy/sympy/pull/25968

From 2251ba15d33656fce53668d789c390923eeae919 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry@gmail.com>
Date: Fri, 8 Dec 2023 15:12:26 -0700
Subject: [PATCH] Avoid incompatible pointer type error with GCC 14

--- a/sympy/utilities/autowrap.py
+++ b/sympy/utilities/autowrap.py
@@ -714,7 +714,11 @@ def binary_function(symfunc, expr, **kwargs):
 _ufunc_outcalls = Template("*((double *)out${outnum}) = ${funcname}(${call_args});")
 
 _ufunc_body = Template("""\
+#ifdef NPY_1_19_API_VERSION
+static void ${funcname}_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
+#else
 static void ${funcname}_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+#endif
 {
     npy_intp i;
     npy_intp n = dimensions[0];
--- a/sympy/utilities/tests/test_autowrap.py
+++ b/sympy/utilities/tests/test_autowrap.py
@@ -284,7 +284,11 @@ def test_ufuncify_source():
         {NULL, NULL, 0, NULL}
 };
 
+#ifdef NPY_1_19_API_VERSION
+static void test_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
+#else
 static void test_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+#endif
 {
     npy_intp i;
     npy_intp n = dimensions[0];
@@ -378,7 +382,11 @@ def test_ufuncify_source_multioutput():
         {NULL, NULL, 0, NULL}
 };
 
+#ifdef NPY_1_19_API_VERSION
+static void multitest_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data)
+#else
 static void multitest_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data)
+#endif
 {
     npy_intp i;
     npy_intp n = dimensions[0];