From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (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 2D296469719 for ; Tue, 17 Mar 2020 02:04:51 +0300 (MSK) References: <20200313140612.29775-1-olegrok@tarantool.org> From: Vladislav Shpilevoy Message-ID: <5905e1da-c4a6-6d9b-d17c-a2dbe1d14033@tarantool.org> Date: Tue, 17 Mar 2020 00:04:48 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Babin , tarantool-patches@dev.tarantool.org, korablev@tarantool.org Cc: Oleg Babin >>> diff --git a/src/box/sequence.h b/src/box/sequence.h >>> index a164da9af..8c442872a 100644 >>> --- a/src/box/sequence.h >>> +++ b/src/box/sequence.h >>> @@ -171,10 +171,11 @@ sequence_data_iterator_create(void); >>>    * Get last element of given sequence. >>>    * >>>    * @param seq sequence to get value from. >>> - * @retval last element of sequence. >>> + * @result value of sequence. >> >> 3. According to doxygen doc, @result is the same as @return. So >> this comment says "return value of sequence". I think you wanted >> to refer to 'result' parameter. For that doxygen provides command >> @param. >> >>> + * Return 0 on success, -1 if sequence is not initialized. >> >> 4. Doxygen way of documenting return values is either >> >>      @retval Meaning. >>      @retval Meaning. >> >> Or >> >>      @return/returns Meaning. >> >>>    */ > > I looked how it was done for "sequence_next" and have changed in the same manner: > | /** > | * Get last element of given sequence. > | * > | * @param seq sequence to get value from. > | * On success, return 0 and assign the current value of the > | * sequence to @result, otherwise return -1 and set diag. > | */ The problem is that sequence_next() comment also is not a valid doxygen syntax. So copy-paste here is not a solution. But ok, I guess it is time to give up on trying to make the comments correct everywhere. LGTM. Nikita, please, do a second review.