summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-11-19 19:17:34 -0600
committerGitHub <noreply@github.com>2018-11-19 19:17:34 -0600
commitf332aae17941186aa3254231cbef8b09eda4a0a9 (patch)
tree0b654b06468e1063eb076bf0fec16dd0330da8d7 /numpy/core
parent403d63749d0c6fe67ed9417a97d2d47de1405405 (diff)
parente303ad07d591f56c964e9c4dbc358d64b4ae18a1 (diff)
downloadnumpy-f332aae17941186aa3254231cbef8b09eda4a0a9.tar.gz
Merge pull request #12286 from mattip/no-api-warn
ENH: Do not emit compiler warning if forcing old API
Diffstat (limited to 'numpy/core')
-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