summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/private/get_attr_string.h6
-rw-r--r--numpy/core/src/private/ufunc_override.c1
-rw-r--r--numpy/core/src/umath/override.c1
3 files changed, 3 insertions, 5 deletions
diff --git a/numpy/core/src/private/get_attr_string.h b/numpy/core/src/private/get_attr_string.h
index 50df4464c..bec87c5ed 100644
--- a/numpy/core/src/private/get_attr_string.h
+++ b/numpy/core/src/private/get_attr_string.h
@@ -53,7 +53,7 @@ _is_basic_python_type(PyTypeObject *tp)
*
* Returns attribute value on success, NULL on failure.
*/
-static PyObject *
+static NPY_INLINE PyObject *
maybe_get_attr(PyObject *obj, char *name)
{
PyTypeObject *tp = Py_TYPE(obj);
@@ -94,7 +94,7 @@ maybe_get_attr(PyObject *obj, char *name)
*
* In future, could be made more like _Py_LookupSpecial
*/
-static PyObject *
+static NPY_INLINE PyObject *
PyArray_LookupSpecial(PyObject *obj, char *name)
{
PyTypeObject *tp = Py_TYPE(obj);
@@ -115,7 +115,7 @@ PyArray_LookupSpecial(PyObject *obj, char *name)
*
* Kept for backwards compatibility. In future, we should deprecate this.
*/
-static PyObject *
+static NPY_INLINE PyObject *
PyArray_LookupSpecial_OnInstance(PyObject *obj, char *name)
{
PyTypeObject *tp = Py_TYPE(obj);
diff --git a/numpy/core/src/private/ufunc_override.c b/numpy/core/src/private/ufunc_override.c
index 22616f440..401228236 100644
--- a/numpy/core/src/private/ufunc_override.c
+++ b/numpy/core/src/private/ufunc_override.c
@@ -28,7 +28,6 @@ get_non_default_array_ufunc(PyObject *obj)
static PyObject *ndarray = NULL;
static PyObject *ndarray_array_ufunc = NULL;
PyObject *cls_array_ufunc;
- int non_default;
/* on first entry, import and cache ndarray and its __array_ufunc__ */
if (ndarray == NULL) {
diff --git a/numpy/core/src/umath/override.c b/numpy/core/src/umath/override.c
index b6377ee86..a8fab87a0 100644
--- a/numpy/core/src/umath/override.c
+++ b/numpy/core/src/umath/override.c
@@ -496,7 +496,6 @@ PyUFunc_CheckOverride(PyUFuncObject *ufunc, char *method,
/* Call __array_ufunc__ functions in correct order */
while (1) {
- PyObject *array_ufunc;
PyObject *override_obj;
PyObject *override_array_ufunc;