summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2016-11-28 22:44:28 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2016-11-28 22:50:52 +0000
commit7268f58c4c019353d987689d80bd22eedfbfc423 (patch)
treeff805ae01c50acc6becf87fa01597ca74f7a115e /Source
parent5d50ebc769cd6b371a6e46fe48a0bb8f2423cd92 (diff)
downloadswig-7268f58c4c019353d987689d80bd22eedfbfc423.tar.gz
Fix %rename override of wildcard %rename for templates
%rename(GlobalIntOperator) *::operator bool; // wildcard %rename %rename(XIntOperator) X::operator bool; // fix now overrides first %rename above OR %rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above template<typename T> struct X { operator bool(); ... }; %template(Xint) X<int>;
Diffstat (limited to 'Source')
-rw-r--r--Source/Swig/naming.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Swig/naming.c b/Source/Swig/naming.c
index c7f187177..ea059aa28 100644
--- a/Source/Swig/naming.c
+++ b/Source/Swig/naming.c
@@ -404,7 +404,17 @@ DOH *Swig_name_object_get(Hash *namehash, String *prefix, String *name, SwigType
}
Delete(cls);
}
- /* A template-based class lookup, check name first */
+ /* Lookup a name within a templated-based class */
+ if (!rn) {
+ String *t_name = SwigType_istemplate_templateprefix(prefix);
+ if (t_name) {
+ Clear(tname);
+ Printf(tname, "%s::%s", t_name, name);
+ rn = name_object_get(namehash, tname, decl, ncdecl);
+ Delete(t_name);
+ }
+ }
+ /* Lookup a template-based name within a class */
if (!rn) {
String *t_name = SwigType_istemplate_templateprefix(name);
if (t_name)