From 2c1318214c8e32fb7fd01a9fc5aeee9930dc190a Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 9 Feb 2006 21:11:03 +0000 Subject: [PATCH] fix infinite loop reported by Olly when using %template() ... inside a class git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8765 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/parser.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index 0f6835bab..f5c2cb933 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -879,7 +879,7 @@ static String *resolve_node_scope(String *cname) { Delete(nname); } if (ns) { - /* we will to try to create a new node using the namespaces we + /* we will try to create a new node using the namespaces we can find in the scope name */ List *scopes; String *sname; @@ -2509,7 +2509,9 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va tscope = Swig_symbol_current(); /* Get the current scope */ /* If the class name is qualified. We need to create or lookup namespace entries */ - $5 = resolve_node_scope($5); + if (!inclass) { + $5 = resolve_node_scope($5); + } /* we use the new namespace entry 'nscope' only to