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
This commit is contained in:
Marcelo Matus 2005-02-22 19:51:59 +00:00
commit 43b0008892

View file

@ -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