Bug 328106: Removal of HT_ENUMERATE_UNHASH. Its implementation had a bug
for 11 years which is a good demonstration that it has never been used. git-svn-id: svn://10.0.0.236/trunk@191015 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
af51e73d0e
commit
08f4373874
@ -361,12 +361,10 @@ JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg)
|
||||
while ((he = *hep) != NULL) {
|
||||
rv = f(he, n, arg);
|
||||
n++;
|
||||
if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
|
||||
if (rv & HT_ENUMERATE_REMOVE) {
|
||||
*hep = he->next;
|
||||
if (rv & HT_ENUMERATE_REMOVE) {
|
||||
he->next = todo;
|
||||
todo = he;
|
||||
}
|
||||
he->next = todo;
|
||||
todo = he;
|
||||
} else {
|
||||
hep = &he->next;
|
||||
}
|
||||
|
||||
@ -64,7 +64,6 @@ typedef intN (* JS_DLL_CALLBACK JSHashEnumerator)(JSHashEntry *he, intN i, void
|
||||
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */
|
||||
#define HT_ENUMERATE_STOP 1 /* stop enumerating entries */
|
||||
#define HT_ENUMERATE_REMOVE 2 /* remove and free the current entry */
|
||||
#define HT_ENUMERATE_UNHASH 4 /* just unhash the current entry */
|
||||
|
||||
typedef struct JSHashAllocOps {
|
||||
void * (*allocTable)(void *pool, size_t size);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user