fixes for Sun Studio 9, test it
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6615 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8ec5f847e5
commit
18d3f92b53
2 changed files with 43 additions and 2 deletions
|
|
@ -33,6 +33,16 @@
|
||||||
# define SWIGINLINE
|
# define SWIGINLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
needed at Swig_cfunction_call/Swig_cmethod_call (cwrap.c) when
|
||||||
|
using template calls
|
||||||
|
*/
|
||||||
|
#if defined(__SUNPRO_CC)
|
||||||
|
#define SWIG_TEMPLATE_DISAMBIGUATOR template
|
||||||
|
#else
|
||||||
|
#define SWIG_TEMPLATE_DISAMBIGUATOR
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This should only be incremented when either the layout of swig_type_info changes,
|
/* This should only be incremented when either the layout of swig_type_info changes,
|
||||||
or for whatever reason, the runtime changes incompatibly */
|
or for whatever reason, the runtime changes incompatibly */
|
||||||
#define SWIG_RUNTIME_VERSION "1"
|
#define SWIG_RUNTIME_VERSION "1"
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,28 @@ Swig_cfunction_call(String_or_char *name, ParmList *parms) {
|
||||||
|
|
||||||
func = NewString("");
|
func = NewString("");
|
||||||
nname = SwigType_namestr(name);
|
nname = SwigType_namestr(name);
|
||||||
Printf(func,"%s(", nname);
|
|
||||||
|
/*
|
||||||
|
SWIG_TEMPLATE_DESIMBUAGATOR is compiler dependent (common.swg),
|
||||||
|
- SUN Studio 9 requires 'template',
|
||||||
|
- gcc-3.4 forbids the use of 'template'.
|
||||||
|
the rest seems not caring very much,
|
||||||
|
*/
|
||||||
|
if (SwigType_istemplate(name)) {
|
||||||
|
String *prefix = Swig_scopename_prefix(nname);
|
||||||
|
String *last = Swig_scopename_last(nname);
|
||||||
|
if (!prefix || Len(prefix) == 0) {
|
||||||
|
Printf(func,"%s(", last);
|
||||||
|
} else {
|
||||||
|
Printf(func,"%s::SWIG_TEMPLATE_DISAMBIGUATOR %s(", prefix, last);
|
||||||
|
}
|
||||||
|
Delete(prefix);
|
||||||
|
Delete(last);
|
||||||
|
} else {
|
||||||
|
Printf(func,"%s(", nname);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
while (p) {
|
while (p) {
|
||||||
String *pname;
|
String *pname;
|
||||||
pt = Getattr(p,"type");
|
pt = Getattr(p,"type");
|
||||||
|
|
@ -324,7 +345,17 @@ Swig_cmethod_call(String_or_char *name, ParmList *parms, String_or_char *self) {
|
||||||
Replaceall(func,"this", SwigType_rcaststr(pt, Swig_cparm_name(p,0)));
|
Replaceall(func,"this", SwigType_rcaststr(pt, Swig_cparm_name(p,0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Printf(func,"%s(", nname);
|
/*
|
||||||
|
SWIG_TEMPLATE_DESIMBUAGATOR is compiler dependent (common.swg),
|
||||||
|
- SUN Studio 9 requires 'template',
|
||||||
|
- gcc-3.4 forbids the use of 'template'.
|
||||||
|
the rest seems not caring very much,
|
||||||
|
*/
|
||||||
|
if (SwigType_istemplate(name)) {
|
||||||
|
Printf(func,"SWIG_TEMPLATE_DISAMBIGUATOR %s(", nname);
|
||||||
|
} else {
|
||||||
|
Printf(func,"%s(", nname);
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
p = nextSibling(p);
|
p = nextSibling(p);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue