summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Mariasis <ericmariasis829@gmail.com>2020-02-01 08:23:17 -0500
committerEric Mariasis <ericmariasis829@gmail.com>2020-02-01 08:23:17 -0500
commit2a75fa5c07b3bb366978bbd21233ca8296dfcce4 (patch)
tree3ff78e16a02e7b97a3b60ecd2e5323d767e8ceeb
parentea28bc2b84a82a3883e3002f983b076e5bab7ffb (diff)
downloadnumpy-2a75fa5c07b3bb366978bbd21233ca8296dfcce4.tar.gz
inlining single use function
-rw-r--r--numpy/core/src/multiarray/descriptor.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c
index 5143eb2dc..4008fdf2a 100644
--- a/numpy/core/src/multiarray/descriptor.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -39,15 +39,6 @@
static PyObject *typeDict = NULL; /* Must be explicitly loaded */
-/*
- * Generate a vague error message when a function returned NULL but forgot
- * to set an exception. We should aim to remove this eventually.
- */
-static void
-_report_generic_error(void) {
- PyErr_SetString(PyExc_TypeError, "data type not understood");
-}
-
static PyArray_Descr *
_try_convert_from_inherit_tuple(PyArray_Descr *type, PyObject *newobj);
@@ -1505,7 +1496,7 @@ _convert_from_any(PyObject *obj, int align)
return ret;
}
Py_DECREF(ret);
- _report_generic_error();
+ PyErr_SetString(PyExc_TypeError, "data type not understood");
return NULL;
}
}