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:
parent
0abaadfa62
commit
ed291c808f
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue