Fixed infinite loop on enum.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@859 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-09-19 16:40:54 +00:00
commit 9b3c9e12d2
2 changed files with 7 additions and 4 deletions

View file

@ -1086,6 +1086,10 @@ static void init_scopes() {
int SwigType_typedef(SwigType *type, String_or_char *name) {
init_scopes();
if (Getattr(scopes[scope_level],name)) return -1;
if (Cmp(type,name) == 0) {
return 0;
}
Setattr(scopes[scope_level],name,type);
if (default_cache)
Delattr(default_cache,type);