Fixed major performance problem with setscope.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b750826a4e
commit
2bbdb1f30e
1 changed files with 3 additions and 1 deletions
|
|
@ -159,7 +159,8 @@ Hash_scope(DOH *ho, int s) {
|
|||
if (h->flags & DOH_FLAG_SETSCOPE) return;
|
||||
if (s < h->scope) h->scope = s;
|
||||
h->flags = h->flags | DOH_FLAG_SETSCOPE;
|
||||
for (i = 0; i < h->hashsize; i++) {
|
||||
if (h->scope != s) {
|
||||
for (i = 0; i < h->hashsize; i++) {
|
||||
if ((n = h->hashtable[i])) {
|
||||
while (n) {
|
||||
Setscope(n->object,s);
|
||||
|
|
@ -167,6 +168,7 @@ Hash_scope(DOH *ho, int s) {
|
|||
n = n->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
h->flags = h->flags & ~DOH_FLAG_SETSCOPE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue