mdbx: удаление const у транзакции в cursor_bind() и cursor_renew().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-03-02 10:41:38 +03:00
parent bc464521c0
commit fbb93f9cfb
3 changed files with 11 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ MDBX_cursor *mdbx_cursor_create(void *context) {
return &couple->outer;
}
int mdbx_cursor_renew(const MDBX_txn *txn, MDBX_cursor *mc) {
int mdbx_cursor_renew(MDBX_txn *txn, MDBX_cursor *mc) {
return likely(mc) ? mdbx_cursor_bind(txn, mc, (kvx_t *)mc->clc - txn->env->kvs) : LOG_IFERR(MDBX_EINVAL);
}
@@ -40,7 +40,7 @@ int mdbx_cursor_reset(MDBX_cursor *mc) {
return MDBX_SUCCESS;
}
int mdbx_cursor_bind(const MDBX_txn *txn, MDBX_cursor *mc, MDBX_dbi dbi) {
int mdbx_cursor_bind(MDBX_txn *txn, MDBX_cursor *mc, MDBX_dbi dbi) {
if (unlikely(!mc))
return LOG_IFERR(MDBX_EINVAL);
@@ -88,7 +88,7 @@ int mdbx_cursor_bind(const MDBX_txn *txn, MDBX_cursor *mc, MDBX_dbi dbi) {
mc->next = txn->cursors[dbi];
txn->cursors[dbi] = mc;
((MDBX_txn *)txn)->flags |= txn_may_have_cursors;
txn->flags |= txn_may_have_cursors;
return MDBX_SUCCESS;
}
@@ -127,7 +127,7 @@ int mdbx_cursor_unbind(MDBX_cursor *mc) {
return MDBX_SUCCESS;
}
int mdbx_cursor_open(const MDBX_txn *txn, MDBX_dbi dbi, MDBX_cursor **ret) {
int mdbx_cursor_open(MDBX_txn *txn, MDBX_dbi dbi, MDBX_cursor **ret) {
if (unlikely(!ret))
return LOG_IFERR(MDBX_EINVAL);
*ret = nullptr;