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 E14B044643C for ; Thu, 15 Oct 2020 02:41:52 +0300 (MSK) References: <808c8f94de8981eab1e8971b73514b937aa808f7.1602541394.git.alexander.turenko@tarantool.org> From: Vladislav Shpilevoy Message-ID: <7e3aff14-a8fb-5db1-7ca9-3755e0e57358@tarantool.org> Date: Thu, 15 Oct 2020 01:41:51 +0200 MIME-Version: 1.0 In-Reply-To: <808c8f94de8981eab1e8971b73514b937aa808f7.1602541394.git.alexander.turenko@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v3 14/16] module api: expose box_key_def_extract_key() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Thanks for the patch! > diff --git a/src/box/key_def.c b/src/box/key_def.c > index 7226f2482..da1c23135 100644 > --- a/src/box/key_def.c > +++ b/src/box/key_def.c > @@ -620,6 +620,13 @@ box_key_def_merge(const box_key_def_t *first, const box_key_def_t *second) > return key_def_merge(first, second); > } > > +char * > +box_key_def_extract_key(box_key_def_t *key_def, box_tuple_t *tuple, > + int multikey_idx, uint32_t *key_size_ptr) I would try to make the tuple const here. Key_def can't be const (because multikey updates some values in it even in simple getters), but the tuple can. Although it requires const addition to several internal functions.