diff options
author | David Cournapeau <cournape@gmail.com> | 2008-10-08 13:33:34 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-10-08 13:33:34 +0000 |
commit | dd7abccf331365e58b867a5601db089a1c51444a (patch) | |
tree | b408d16ee1f1195913c6822bdf1130fef788f0cf /numpy | |
parent | 551a30171d30ce75e276c988dcb7dc499f60cbbc (diff) | |
download | numpy-dd7abccf331365e58b867a5601db089a1c51444a.tar.gz |
Add utils.h, with macro to tag a variable as unused.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/utils.h b/numpy/core/include/numpy/utils.h new file mode 100644 index 000000000..eb9fb5aa7 --- /dev/null +++ b/numpy/core/include/numpy/utils.h @@ -0,0 +1,19 @@ +#ifndef __NUMPY_UTILS_HEADER__ +#define __NUMPY_UTILS_HEADER__ + +#ifndef __COMP_NPY_UNUSED + #if defined(__GNUC__) + #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) + # elif defined(__ICC) + #define __COMP_NPY_UNUSED __attribute__ ((__unused__)) + #else + #define __COMP_NPY_UNUSED + #endif +#endif + +/* Use this to tag a variable as not used. It will remove unused variable + * warning on support platforms (see __COM_NPY_UNUSED) and mangle the variable + * to avoid accidental use */ +#define NPY_UNUSED(x) (__NPY_UNUSED_TAGGED ## x) __COMP_NPY_UNUSED + +#endif |