From de4f7157128923d65ce0e51f1b36e8361284a9b7 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 2 Nov 2004 18:48:59 +0000 Subject: [PATCH] add more docs git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6620 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/common.swg | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/SWIG/Lib/common.swg b/SWIG/Lib/common.swg index 0ff43276e..df8afe5ac 100644 --- a/SWIG/Lib/common.swg +++ b/SWIG/Lib/common.swg @@ -27,20 +27,32 @@ #define SWIGRUNTIME(x) static x +#ifndef SWIGINLINE #if defined(__cplusplus) || defined(__GNUC__) # define SWIGINLINE inline #else # define SWIGINLINE #endif +#endif /* - needed at Swig_cfunction_call/Swig_cmethod_call (cwrap.c) when - using template calls + SWIG_TEMPLATE_DISAMBIGUATOR is needed when wrapping template calls + (cwrap.c:Swig_cfunction_call/Swig_cmethod_call), as in + + result = nspace::template function(arg1); + result = arg1->template method(arg2); + + SWIG_TEMPLATE_DISAMBIGUATOR 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' */ -#if defined(__SUNPRO_CC) -#define SWIG_TEMPLATE_DISAMBIGUATOR template -#else -#define SWIG_TEMPLATE_DISAMBIGUATOR +#ifndef SWIG_TEMPLATE_DISAMBIGUATOR +# if defined(__SUNPRO_CC) +# define SWIG_TEMPLATE_DISAMBIGUATOR template +# else +# define SWIG_TEMPLATE_DISAMBIGUATOR +# endif #endif /* This should only be incremented when either the layout of swig_type_info changes,