fix for templates to avoid using the templatereduce mode

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7961 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-09 09:25:28 +00:00
commit 99f0122d0d
5 changed files with 24 additions and 4 deletions

View file

@ -1016,6 +1016,10 @@ symbol_lookup_qualified(String_or_char *name, Symtab *symtab, String *prefix, in
* to get the real node.
* ----------------------------------------------------------------------------- */
static
SwigType *Swig_symbol_template_reduce(SwigType *qt, Symtab *ntab);
Node *
Swig_symbol_clookup(String_or_char *name, Symtab *n) {
Hash *hsym = 0;
@ -1052,6 +1056,19 @@ Swig_symbol_clookup(String_or_char *name, Symtab *n) {
}
}
}
if (!s) {
if (SwigType_istemplate(name)) {
SwigType *qt = Swig_symbol_type_qualify(name,hsym);
SwigType *rt = Swig_symbol_template_reduce(qt, hsym);
if (!Equal(rt,name)) {
s = Swig_symbol_clookup(rt, hsym);
}
Delete(qt);
Delete(rt);
}
}
if (!s) {
while (hsym) {
s = symbol_lookup(name,hsym,0);