From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 15 Oct 2018 22:39:08 +0300 From: Vladimir Davydov Subject: Re: [PATCH v4 04/14] box: introduce tuple_format_add_key_part Message-ID: <20181015193908.uyeboydzbcct4pyx@esperanza> References: <70c310a1b88bfb9a0857deb849414438655d17c2.1539244271.git.kshcherbatov@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70c310a1b88bfb9a0857deb849414438655d17c2.1539244271.git.kshcherbatov@tarantool.org> To: Kirill Shcherbatov Cc: tarantool-patches@freelists.org List-ID: On Thu, Oct 11, 2018 at 10:58:49AM +0300, Kirill Shcherbatov wrote: > diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c > index 5679cad..d8acaa5 100644 > --- a/src/box/tuple_format.c > +++ b/src/box/tuple_format.c > @@ -42,6 +42,71 @@ static const struct tuple_field tuple_field_default = { > }; > > /** > + * Add and initialize a new key_part to format. > + * @param format Format to initialize. > + * @param fields Fields definition if any. > + * @param fields_count Count of @fields. > + * @param part An index part to append. > + * @param is_sequential Does this part sequential. > + * @param current_slot Pointer to last offset slot. > + * @retval -1 On error. > + * @retval 0 On success. > + */ A doxygen comment is not needed here, because this is a static function needed solely to reduce the indentation level of tuple_format_create. Moreover, all those parameter descirptions simply repeat argument names and hence useless. At the same time the comment itself is misleading and incomplete: what is "initialize a new key_part to format" supposed to mean? Does this function initialize the given key part? No, it doesn't touch it. Please elaborate. > +static int > +tuple_format_add_key_part(struct tuple_format *format, > + const struct field_def *fields, uint32_t field_count, > + const struct key_part *part, bool is_sequential, > + int *current_slot)