From b449dfde4bce9ff12a71dab8d14015b4233200a3 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sat, 18 Jan 2014 18:51:43 +0100 Subject: [PATCH] MAINT: remove unused simple_capsule_dtor() from npy_3kcompat.h This removes a lot of build warnings when including this file. --- doc/release/1.9.0-notes.rst | 6 ++++++ numpy/core/include/numpy/npy_3kcompat.h | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/release/1.9.0-notes.rst b/doc/release/1.9.0-notes.rst index 45d50fc05f6b..bbb08ff3b2c8 100644 --- a/doc/release/1.9.0-notes.rst +++ b/doc/release/1.9.0-notes.rst @@ -30,6 +30,12 @@ to an array via `np.array`. If the `overwrite_input` option is used the input is only partially instead of fully sorted. +npy_3kcompat.h header change +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The unused ``simple_capsule_dtor`` function has been removed from +``npy_3kcompat.h``. Note that this header is not meant to be used outside of +numpy; other projects should be using their own copy of this file when needed. + New Features ============ diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h index a139e47f6125..0d33de17a83c 100644 --- a/numpy/core/include/numpy/npy_3kcompat.h +++ b/numpy/core/include/numpy/npy_3kcompat.h @@ -391,12 +391,6 @@ NpyCapsule_Check(PyObject *ptr) return PyCapsule_CheckExact(ptr); } -static NPY_INLINE void -simple_capsule_dtor(PyObject *cap) -{ - PyArray_free(PyCapsule_GetPointer(cap, NULL)); -} - #else static NPY_INLINE PyObject * @@ -430,12 +424,6 @@ NpyCapsule_Check(PyObject *ptr) return PyCObject_Check(ptr); } -static NPY_INLINE void -simple_capsule_dtor(void *ptr) -{ - PyArray_free(ptr); -} - #endif /*