Skip to content

Commit 8ee6a32

Browse files
committed
BUG: generate_numpy_api: fix C90 violation
Encountered this because of gcc-14. ISO C90 forbids mixed declarations and code
1 parent 2e700c6 commit 8ee6a32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpy/_core/code_generators/generate_numpy_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
{
6666
int st;
6767
PyObject *numpy = PyImport_ImportModule("numpy._core._multiarray_umath");
68+
PyObject *c_api;
6869
if (numpy == NULL && PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)) {
6970
PyErr_Clear();
7071
numpy = PyImport_ImportModule("numpy.core._multiarray_umath");
@@ -74,7 +75,7 @@
7475
return -1;
7576
}
7677
77-
PyObject *c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
78+
c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
7879
Py_DECREF(numpy);
7980
if (c_api == NULL) {
8081
return -1;

0 commit comments

Comments
 (0)