Uniform SWIGEXPORT handling, reverting back to SWIG-1.3.24 approach, plus changes which remove unnecessary Borland specific handling.
SWIGSTDCALL available for all languages and can be overidden by users. General tidy up. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7231 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e728c09704
commit
2c68f72234
1 changed files with 17 additions and 26 deletions
|
|
@ -5,18 +5,7 @@
|
||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
/*
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
||||||
SWIGTEMPLATEDISAMBIGUATOR is needed when wrapping template calls
|
|
||||||
(cwrap.c:Swig_cfunction_call/Swig_cmethod_call), as in
|
|
||||||
|
|
||||||
result = nspace::template function<int >(arg1);
|
|
||||||
result = arg1->template method<int >(arg2);
|
|
||||||
|
|
||||||
SWIGTEMPLATEDISAMBIGUATOR is compiler dependent (common.swg),
|
|
||||||
- SUN Studio requires 'template',
|
|
||||||
- gcc-3.4 forbids the use of 'template'.
|
|
||||||
- gcc-3.2.3 produces internal errors if you use 'template'
|
|
||||||
*/
|
|
||||||
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
||||||
# if defined(__SUNPRO_CC)
|
# if defined(__SUNPRO_CC)
|
||||||
# define SWIGTEMPLATEDISAMBIGUATOR template
|
# define SWIGTEMPLATEDISAMBIGUATOR template
|
||||||
|
|
@ -34,7 +23,7 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* attritbute passed for some compilers to avoid 'unused' warnings */
|
/* attribute recognised by some compilers to avoid 'unused' warnings */
|
||||||
#ifndef SWIGUNUSED
|
#ifndef SWIGUNUSED
|
||||||
# if defined(__GNUC__) || defined(__ICC)
|
# if defined(__GNUC__) || defined(__ICC)
|
||||||
# define SWIGUNUSED __attribute__ ((unused))
|
# define SWIGUNUSED __attribute__ ((unused))
|
||||||
|
|
@ -53,23 +42,25 @@
|
||||||
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
|
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* how we export a method such that it can go in to a shared or dll library */
|
/* exporting methods for Windows DLLs */
|
||||||
#ifndef SWIGEXPORT
|
#ifndef SWIGEXPORT
|
||||||
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||||
# if defined(_MSC_VER) || defined(__GNUC__)
|
# if defined(STATIC_LINKED)
|
||||||
# if defined(STATIC_LINKED)
|
# define SWIGEXPORT
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) __declspec(dllexport) a
|
|
||||||
# endif
|
|
||||||
# else
|
# else
|
||||||
# if defined(__BORLANDC__)
|
# define SWIGEXPORT __declspec(dllexport)
|
||||||
# define SWIGEXPORT(a) a _export
|
|
||||||
# else
|
|
||||||
# define SWIGEXPORT(a) a
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define SWIGEXPORT(a) a
|
# define SWIGEXPORT
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* calling conventions for Windows */
|
||||||
|
#ifndef SWIGSTDCALL
|
||||||
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||||
|
# define SWIGSTDCALL __stdcall
|
||||||
|
# else
|
||||||
|
# define SWIGSTDCALL
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue