diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-02-11 18:32:44 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-04-06 18:09:03 -0600 |
commit | f047010fa90d8186eeba59d8f18bc12523b3a27f (patch) | |
tree | 784ea41c9df5c302bf8d51084b88a8b6e5efec83 /numpy | |
parent | 40cba31c25338402817df31773bcca4a7620a3a1 (diff) | |
download | numpy-f047010fa90d8186eeba59d8f18bc12523b3a27f.tar.gz |
ENH: Check that npy_no_deprecated_api.h is included before it is needed.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/npy_no_deprecated_api.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/numpy/core/include/numpy/npy_no_deprecated_api.h b/numpy/core/include/numpy/npy_no_deprecated_api.h index 61db78984..6183dc278 100644 --- a/numpy/core/include/numpy/npy_no_deprecated_api.h +++ b/numpy/core/include/numpy/npy_no_deprecated_api.h @@ -1,10 +1,19 @@ /* - * 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 + * This include file is provided for inclusion in Cython *.pyd files where + * one would like to define the NPY_NO_DEPRECATED_API macro. It can be + * included by * - * cdef extern from "numpy/npy_no_deprecated_api.h": pass + * cdef extern from "npy_no_deprecated_api.h": pass * */ #ifndef NPY_NO_DEPRECATED_API + +/* put this check here since there may be multiple includes in C extensions. */ +#if defined(NDARRAYTYPES_H) || defined(_NPY_DEPRECATED_API_H) || \ + defined(OLD_DEFINES_H) +#error "npy_no_deprecated_api.h" must be first among numpy includes. +#else #define NPY_NO_DEPRECATED_API NPY_API_VERSION #endif + +#endif |