From c993797eb6926b85fcd3b85859e59d0e72000f4a Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 1 Apr 2012 21:58:17 -0600 Subject: UPD: Update files for versioned deprecation. --- numpy/core/include/numpy/npy_no_deprecated_api.h | 9 ++++++++- numpy/core/include/numpy/old_defines.h | 2 +- numpy/core/src/umath/funcs.inc.src | 2 +- numpy/core/src/umath/umath_tests.c.src | 2 +- numpy/fft/fftpack_litemodule.c | 2 +- numpy/linalg/lapack_litemodule.c | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) (limited to 'numpy') diff --git a/numpy/core/include/numpy/npy_no_deprecated_api.h b/numpy/core/include/numpy/npy_no_deprecated_api.h index 9048f5f26..61db78984 100644 --- a/numpy/core/include/numpy/npy_no_deprecated_api.h +++ b/numpy/core/include/numpy/npy_no_deprecated_api.h @@ -1,3 +1,10 @@ +/* + * This file is for inclusion in cython *.pxd files in order to define + * the NPY_NO_DEPRECATED_API macro. In order to include it, do + * + * cdef extern from "numpy/npy_no_deprecated_api.h": pass + * + */ #ifndef NPY_NO_DEPRECATED_API -#define NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_API_VERSION #endif diff --git a/numpy/core/include/numpy/old_defines.h b/numpy/core/include/numpy/old_defines.h index 444fdc33b..f64983aa5 100644 --- a/numpy/core/include/numpy/old_defines.h +++ b/numpy/core/include/numpy/old_defines.h @@ -1,5 +1,5 @@ /* This header is deprecated as of NumPy 1.7 */ -#ifdef NPY_NO_DEPRECATED_API +#if defined(NPY_NO_DEPRECATED_API) && NPY_NO_DEPRECATED_API >= NPY_1_7_API_VERSION #error The header "old_defines.h" is deprecated as of NumPy 1.7. #endif diff --git a/numpy/core/src/umath/funcs.inc.src b/numpy/core/src/umath/funcs.inc.src index 0b9398cd2..f3fefcfc5 100644 --- a/numpy/core/src/umath/funcs.inc.src +++ b/numpy/core/src/umath/funcs.inc.src @@ -6,7 +6,7 @@ * object functions. */ -#define NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_API_VERSION #include "numpy/npy_3kcompat.h" diff --git a/numpy/core/src/umath/umath_tests.c.src b/numpy/core/src/umath/umath_tests.c.src index 1e0adc15c..43583d119 100644 --- a/numpy/core/src/umath/umath_tests.c.src +++ b/numpy/core/src/umath/umath_tests.c.src @@ -5,7 +5,7 @@ ** INCLUDES ** ***************************************************************************** */ -#define NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_API_VERSION #include "Python.h" #include "numpy/arrayobject.h" diff --git a/numpy/fft/fftpack_litemodule.c b/numpy/fft/fftpack_litemodule.c index 48f6f0dfc..7652ac0e2 100644 --- a/numpy/fft/fftpack_litemodule.c +++ b/numpy/fft/fftpack_litemodule.c @@ -1,4 +1,4 @@ -#define NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_API_VERSION #include "fftpack.h" #include "Python.h" diff --git a/numpy/linalg/lapack_litemodule.c b/numpy/linalg/lapack_litemodule.c index 03ff0e3aa..f8b527463 100644 --- a/numpy/linalg/lapack_litemodule.c +++ b/numpy/linalg/lapack_litemodule.c @@ -2,7 +2,7 @@ Modified by Jim Hugunin More modifications by Jeff Whitaker */ -#define NPY_NO_DEPRECATED_API +#define NPY_NO_DEPRECATED_API NPY_API_VERSION #include "Python.h" #include "numpy/arrayobject.h" -- cgit v1.2.1