summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-07-21 10:16:00 -0600
committerCharles Harris <charlesr.harris@gmail.com>2017-07-21 10:16:00 -0600
commit899d279c4ab9532d1dd122f754e536ee7aa75896 (patch)
treebca8367b4abffc51fb5c26b1cb0fde37f5c0038b /numpy
parent08904d79bbd4d5f421a1f2f66e8e1aae9f92f8c8 (diff)
downloadnumpy-899d279c4ab9532d1dd122f754e536ee7aa75896.tar.gz
BUG: Inlined functions must be defined somewhere.
Some inline functions in numpy/core/src/multiarray/mapping.c were defined as `NPY_NO_EXPORT NPY_INLINE` with the result that gcc 7.1 was looking for an external definition. Possibly some of those functions were no longer being inlined. The fix was to replace `NPY_NO_EXPORT` with `static`. A grep of the numpy source files turned up no further uses of that unfortunate combination.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/mapping.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index 1f2055133..d75bd1b92 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -139,7 +139,7 @@ PyArray_MapIterSwapAxes(PyArrayMapIterObject *mit, PyArrayObject **ret, int getm
*ret = (PyArrayObject *)new;
}
-NPY_NO_EXPORT NPY_INLINE void
+static NPY_INLINE void
multi_DECREF(PyObject **objects, npy_intp n)
{
npy_intp i;
@@ -155,7 +155,7 @@ multi_DECREF(PyObject **objects, npy_intp n)
* Useful if a tuple is being iterated over multiple times, or for a code path
* that doesn't always want the overhead of allocating a tuple.
*/
-NPY_NO_EXPORT NPY_INLINE npy_intp
+static NPY_INLINE npy_intp
unpack_tuple(PyTupleObject *index, PyObject **result, npy_intp result_n)
{
npy_intp n, i;
@@ -173,7 +173,7 @@ unpack_tuple(PyTupleObject *index, PyObject **result, npy_intp result_n)
}
/* Unpack a single scalar index, taking a new reference to match unpack_tuple */
-NPY_NO_EXPORT NPY_INLINE npy_intp
+static NPY_INLINE npy_intp
unpack_scalar(PyObject *index, PyObject **result, npy_intp result_n)
{
Py_INCREF(index);