utils.h 628 B

12345678910111213141516171819
  1. #ifndef __NUMPY_UTILS_HEADER__
  2. #define __NUMPY_UTILS_HEADER__
  3. #ifndef __COMP_NPY_UNUSED
  4. #if defined(__GNUC__)
  5. #define __COMP_NPY_UNUSED __attribute__ ((__unused__))
  6. # elif defined(__ICC)
  7. #define __COMP_NPY_UNUSED __attribute__ ((__unused__))
  8. #else
  9. #define __COMP_NPY_UNUSED
  10. #endif
  11. #endif
  12. /* Use this to tag a variable as not used. It will remove unused variable
  13. * warning on support platforms (see __COM_NPY_UNUSED) and mangle the variable
  14. * to avoid accidental use */
  15. #define NPY_UNUSED(x) (__NPY_UNUSED_TAGGED ## x) __COMP_NPY_UNUSED
  16. #endif