summaryrefslogtreecommitdiff
path: root/numpy/core/include
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2018-10-29 20:42:44 +0200
committermattip <matti.picus@gmail.com>2018-11-14 14:20:55 -0800
commite303ad07d591f56c964e9c4dbc358d64b4ae18a1 (patch)
treea1b9110e1d0fd21ee388a0cf3eac87717924808a /numpy/core/include
parent2668b3131812ffd87be335803ca6bb8160234424 (diff)
downloadnumpy-e303ad07d591f56c964e9c4dbc358d64b4ae18a1.tar.gz
ENH: do not emit compilation warning if using old API
Diffstat (limited to 'numpy/core/include')
-rw-r--r--numpy/core/include/numpy/npy_1_7_deprecated_api.h3
1 files changed, 3 insertions, 0 deletions
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 76b57b748..a6ee21219 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