1
0
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:
Heikki Linnakangas
2016-09-02 08:39:39 +03:00
parent 76f9dd4fa8
commit 9f85784cae
4 changed files with 209 additions and 175 deletions

View File

@ -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 */