From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 14 Mar 2019 10:04:47 +0300 From: Vladimir Davydov Subject: Re: [PATCH v6 1/3] box: refactor key_def_set_compare_func routine Message-ID: <20190314070447.dpdu3aocinfiwrtr@esperanza> References: <34cf8ed7af4b1da74a89a260562abe08526cd4e8.1552478226.git.kshcherbatov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34cf8ed7af4b1da74a89a260562abe08526cd4e8.1552478226.git.kshcherbatov@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Wed, Mar 13, 2019 at 03:15:37PM +0300, Kirill Shcherbatov wrote: > @@ -1326,6 +1340,6 @@ tuple_compare_with_key_create(const struct key_def *def) > void > key_def_set_compare_func(struct key_def *def) > { > - def->tuple_compare = tuple_compare_create(def); > - def->tuple_compare_with_key = tuple_compare_with_key_create(def); > + key_def_set_tuple_compare(def); > + key_def_set_tuple_compare_with_key(def); > } The two functions share a lot of code - all branching is basically the same. I think we better merge them instead.