mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Support multiple iterators in the Red-Black Tree implementation.
While we don't need multiple iterators at the moment, the interface is nicer and less dangerous this way. Aleksander Alekseev, with some changes by me.
This commit is contained in:
@ -255,7 +255,7 @@ qsortCompareItemPointers(const void *a, const void *b)
|
||||
void
|
||||
ginBeginBAScan(BuildAccumulator *accum)
|
||||
{
|
||||
rb_begin_iterate(accum->tree, LeftRightWalk);
|
||||
rb_begin_iterate(accum->tree, LeftRightWalk, &accum->tree_walk);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -271,7 +271,7 @@ ginGetBAEntry(BuildAccumulator *accum,
|
||||
GinEntryAccumulator *entry;
|
||||
ItemPointerData *list;
|
||||
|
||||
entry = (GinEntryAccumulator *) rb_iterate(accum->tree);
|
||||
entry = (GinEntryAccumulator *) rb_iterate(&accum->tree_walk);
|
||||
|
||||
if (entry == NULL)
|
||||
return NULL; /* no more entries */
|
||||
|
Reference in New Issue
Block a user