Fixed performance problem with setscope.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@271 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-02-26 15:56:01 +00:00
commit ed291c808f

View file

@ -122,8 +122,10 @@ List_scope(DOH *lo, int s) {
if (l->flags & DOH_FLAG_SETSCOPE) return;
l->flags = l->flags | DOH_FLAG_SETSCOPE;
if (s < l->scope) l->scope = (unsigned char) s;
for (i = 0; i < l->nitems; i++) {
Setscope(l->items[i],s);
if (s != l->scope) {
for (i = 0; i < l->nitems; i++) {
Setscope(l->items[i],s);
}
}
l->flags = l->flags & ~DOH_FLAG_SETSCOPE;
}