fix infinity loop #1209289

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7297 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-06-17 00:46:10 +00:00
commit 92f11f6c3e

View file

@ -1009,8 +1009,10 @@ Swig_symbol_clookup(String_or_char *name, Symtab *n) {
}
/* Check if s is a 'using' node */
while (s && Strcmp(nodeType(s),k_using) == 0) {
Node *ss;
ss = Swig_symbol_clookup(Getattr(s,k_uname), Getattr(s,k_symsymtab));
String *uname = Getattr(s,k_uname);
Symtab *un = Getattr(s,k_symsymtab);
Node *ss = (Strcmp(name,uname) || (un != n)) ?
Swig_symbol_clookup(uname, un) : 0; /* avoid infinity loop */
if (!ss) {
Swig_warning(WARN_PARSE_USING_UNDEF, Getfile(s), Getline(s), "Nothing known about '%s'.\n", Getattr(s,k_uname));
}