Fix for bug 3286333: infinite recursion with mutual "using namespace" clauses.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8f07b3f851
commit
5fbcb711eb
5 changed files with 27 additions and 0 deletions
|
|
@ -960,6 +960,7 @@ static Node *_symbol_lookup(const String *name, Symtab *symtab, int (*check) (No
|
|||
Delete(dname);
|
||||
if (n)
|
||||
return n;
|
||||
Setmark(symtab, 1);
|
||||
}
|
||||
|
||||
inherit = Getattr(symtab, "inherit");
|
||||
|
|
|
|||
|
|
@ -415,9 +415,14 @@ void SwigType_print_scope(void) {
|
|||
|
||||
static Typetab *SwigType_find_scope(Typetab *s, const SwigType *nameprefix) {
|
||||
Typetab *ss;
|
||||
Typetab *s_orig = s;
|
||||
String *nnameprefix = 0;
|
||||
static int check_parent = 1;
|
||||
|
||||
if (Getmark(s))
|
||||
return 0;
|
||||
Setmark(s, 1);
|
||||
|
||||
/* Printf(stdout,"find_scope: %x(%s) '%s'\n", s, Getattr(s,"name"), nameprefix); */
|
||||
|
||||
if (SwigType_istemplate(nameprefix)) {
|
||||
|
|
@ -443,6 +448,7 @@ static Typetab *SwigType_find_scope(Typetab *s, const SwigType *nameprefix) {
|
|||
if (s) {
|
||||
if (nnameprefix)
|
||||
Delete(nnameprefix);
|
||||
Setmark(s_orig, 0);
|
||||
return s;
|
||||
}
|
||||
if (!s) {
|
||||
|
|
@ -462,6 +468,7 @@ static Typetab *SwigType_find_scope(Typetab *s, const SwigType *nameprefix) {
|
|||
if (s) {
|
||||
if (nnameprefix)
|
||||
Delete(nnameprefix);
|
||||
Setmark(s_orig, 0);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
|
@ -473,6 +480,7 @@ static Typetab *SwigType_find_scope(Typetab *s, const SwigType *nameprefix) {
|
|||
}
|
||||
if (nnameprefix)
|
||||
Delete(nnameprefix);
|
||||
Setmark(s_orig, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue