fix template + typedef issue reported by Bo Peng

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8733 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-02-06 23:42:37 +00:00
commit 511e4895b1
2 changed files with 38 additions and 8 deletions

View file

@ -353,9 +353,9 @@ class TypePass : private Dispatcher {
// We need to fully resolve the name to make templates work correctly */
Node *cn;
fname = SwigType_typedef_resolve_all(name);
if (Strcmp(fname,name) != 0) {
cn = Swig_symbol_clookup_local(fname,0);
if ((!cn) || (Strcmp(nodeType(cn),"template") == 0)
if (Strcmp(fname,name) != 0 && (cn = Swig_symbol_clookup_local(fname,0))) {
if ((n == cn)
|| (Strcmp(nodeType(cn),"template") == 0)
|| (Getattr(cn,"feature:onlychildren") != 0)
|| (Getattr(n,"feature:onlychildren") != 0)) {
Swig_symbol_cadd(fname,n);