From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EF7A942EF61 for ; Fri, 3 Jul 2020 09:33:28 +0300 (MSK) Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1jrFGK-0003jC-KA for tarantool-patches@dev.tarantool.org; Fri, 03 Jul 2020 09:33:28 +0300 From: Aleksandr Lyapunov Date: Fri, 3 Jul 2020 09:33:12 +0300 Message-Id: <1593757997-4145-11-git-send-email-alyapunov@tarantool.org> In-Reply-To: <1593757997-4145-1-git-send-email-alyapunov@tarantool.org> References: <1593757997-4145-1-git-send-email-alyapunov@tarantool.org> Subject: [Tarantool-patches] [PATCH 10/15] tx: introduce txn_stmt_destroy List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org From: Aleksandr Lyapunov --- src/box/txn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 8a935d7..d34ec3a 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -120,7 +120,7 @@ txn_stmt_new(struct region *region) } static inline void -txn_stmt_unref_tuples(struct txn_stmt *stmt) +txn_stmt_destroy(struct txn_stmt *stmt) { if (stmt->old_tuple != NULL) tuple_unref(stmt->old_tuple); @@ -168,7 +168,7 @@ txn_rollback_to_svp(struct txn *txn, struct stailq_entry *svp) assert(txn->n_applier_rows > 0); txn->n_applier_rows--; } - txn_stmt_unref_tuples(stmt); + txn_stmt_destroy(stmt); stmt->space = NULL; stmt->row = NULL; } @@ -207,7 +207,7 @@ txn_free(struct txn *txn) { struct txn_stmt *stmt; stailq_foreach_entry(stmt, &txn->stmts, next) - txn_stmt_unref_tuples(stmt); + txn_stmt_destroy(stmt); /* Truncate region up to struct txn size. */ region_truncate(&txn->region, sizeof(struct txn)); -- 2.7.4