From e303ad07d591f56c964e9c4dbc358d64b4ae18a1 Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Oct 2018 20:42:44 +0200 Subject: [PATCH] ENH: do not emit compilation warning if using old API --- numpy/core/include/numpy/npy_1_7_deprecated_api.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/numpy/core/include/numpy/npy_1_7_deprecated_api.h b/numpy/core/include/numpy/npy_1_7_deprecated_api.h index 76b57b748023..a6ee21219cc7 100644 --- a/numpy/core/include/numpy/npy_1_7_deprecated_api.h +++ b/numpy/core/include/numpy/npy_1_7_deprecated_api.h @@ -5,6 +5,8 @@ #error "Should never include npy_*_*_deprecated_api directly." #endif +/* Emit a warning if the user did not specifically request the old API */ +#ifndef NPY_NO_DEPRECATED_API #if defined(_WIN32) #define _WARN___STR2__(x) #x #define _WARN___STR1__(x) _WARN___STR2__(x) @@ -16,6 +18,7 @@ "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" #endif /* TODO: How to do this warning message for other compilers? */ +#endif /* * This header exists to collect all dangerous/deprecated NumPy API