diff options
author | Marcelo Matus <mmatus@acms.arizona.edu> | 2005-02-22 19:51:59 +0000 |
---|---|---|
committer | Marcelo Matus <mmatus@acms.arizona.edu> | 2005-02-22 19:51:59 +0000 |
commit | 43b0008892c7e3ed9e5dc874a16943e6e16cd764 (patch) | |
tree | 11c169fe1c3e64dcccef203fce04aedb1d5fe896 /Lib/swigrun.swg | |
parent | 0f4ccf3f96641ffac47f881a970628a3764a5503 (diff) | |
download | swig-43b0008892c7e3ed9e5dc874a16943e6e16cd764.tar.gz |
fix static/inline warning, add SWIGUNUSED attribute
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6979 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/swigrun.swg')
-rw-r--r-- | Lib/swigrun.swg | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg index 0e903a336..6fb33fa2a 100644 --- a/Lib/swigrun.swg +++ b/Lib/swigrun.swg @@ -29,6 +29,15 @@ #endif #endif +/* attritbute passed for some compilers to avoid unused method warnings */ +#ifndef SWIGUNUSED +#ifdef __GNUC__ +#define SWIGUNUSED __attribute__ ((unused)) +#else +#define SWIGUNUSED +#endif +#endif + /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the swig runtime code. @@ -37,13 +46,11 @@ But only do this if is strictly necessary, ie, if you have problems with your compiler or so. */ + #ifndef SWIGRUNTIME -#ifdef __GNUC__ -#define SWIGRUNTIME __attribute__ ((unused)) static -#else -#define SWIGRUNTIME static -#endif +#define SWIGRUNTIME static SWIGUNUSED #endif + #ifndef SWIGRUNTIMEINLINE #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif |