Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5df5c3e

Browse files
author
Artur Zakirov
committed
Use updated API to work with iterators in the Red-Black Tree
1 parent4fd473d commit5df5c3e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎rum.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ typedef struct
743743
RumEntryAccumulator*entryallocator;
744744
uint32eas_used;
745745
RBTree*tree;
746+
#ifPG_VERSION_NUM >=100000
747+
RBTreeIteratortree_walk;
748+
#endif
746749
RumKey*sortSpace;
747750
uint32sortSpaceN;
748751
}BuildAccumulator;

‎rumbulk.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ qsortCompareRumKey(const void *a, const void *b, void *arg)
272272
void
273273
rumBeginBAScan(BuildAccumulator*accum)
274274
{
275+
#ifPG_VERSION_NUM >=100000
276+
rb_begin_iterate(accum->tree,LeftRightWalk,&accum->tree_walk);
277+
#else
275278
rb_begin_iterate(accum->tree,LeftRightWalk);
279+
#endif
276280
}
277281

278282
/*
@@ -288,7 +292,11 @@ rumGetBAEntry(BuildAccumulator *accum,
288292
RumEntryAccumulator*entry;
289293
RumKey*list;
290294

295+
#ifPG_VERSION_NUM >=100000
296+
entry= (RumEntryAccumulator*)rb_iterate(&accum->tree_walk);
297+
#else
291298
entry= (RumEntryAccumulator*)rb_iterate(accum->tree);
299+
#endif
292300

293301
if (entry==NULL)
294302
returnNULL;/* no more entries */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp