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:
parent
0f4ccf3f96
commit
43b0008892
1 changed files with 12 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue