mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-07 07:18:56 +08:00
mdbx: рефакторинг cursor_eot() для упрощения txn_done_cursors().
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user