[Tarantool-patches] [PATCH 2.X 2/7] module api: export box_key_def_dup
Alexander Turenko
alexander.turenko at tarantool.org
Tue Sep 29 08:03:40 MSK 2020
On Tue, Sep 29, 2020 at 12:21:02AM +0200, Vladislav Shpilevoy wrote:
> Thanks for the patch!
>
> See 2 comments below.
>
> On 24.09.2020 19:00, Timur Safin wrote:
> > Exporting `box_key_def_dup` as accessor to the internal `key_def_dup`
>
> 1. Do you really need this method? It looks like it can be done by
>
> old_parts = box_key_def_dump_parts(old_key_def);
> new_key_def = box_key_def_new_ex(old_parts);
>
> So the method seems redundant.
It is not strictly necessary, however using of box_key_def_dup() would
be less error-prone (no extra allocations) and the resulting code would
be more readable. My vote is for this method if you have no strict
objections.
More information about the Tarantool-patches
mailing list