Skip to content

Commit cebd52a

Browse files
committed
BUG: Don't use C99 construct in import_umath
1 parent 8ee6a32 commit cebd52a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpy/_core/code_generators/generate_ufunc_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
static inline int
3939
_import_umath(void)
4040
{
41+
PyObject *c_api;
4142
PyObject *numpy = PyImport_ImportModule("numpy._core._multiarray_umath");
4243
if (numpy == NULL && PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)) {
4344
PyErr_Clear();
@@ -50,7 +51,7 @@
5051
return -1;
5152
}
5253
53-
PyObject *c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
54+
c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
5455
Py_DECREF(numpy);
5556
if (c_api == NULL) {
5657
PyErr_SetString(PyExc_AttributeError, "_UFUNC_API not found");

0 commit comments

Comments
 (0)