mdbx: рефакторинг cursor_eot() для упрощения txn_done_cursors().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-03-06 10:29:57 +03:00
parent 436998ca83
commit 333069e7a8
4 changed files with 19 additions and 19 deletions

View File

@@ -15,11 +15,9 @@ void txn_done_cursors(MDBX_txn *txn) {
MDBX_cursor *cursor = txn->cursors[i];
if (cursor) {
txn->cursors[i] = nullptr;
do {
MDBX_cursor *const next = cursor->next;
cursor_eot(cursor);
cursor = next;
} while (cursor);
do
cursor = cursor_eot(cursor, txn);
while (cursor);
}
}
txn->flags &= ~txn_may_have_cursors;