Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Oleg Babin <olegrok@tarantool.org>,
	tarantool-patches@dev.tarantool.org, korablev@tarantool.org
Cc: Oleg Babin <babinoleg@mail.ru>
Subject: Re: [Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence
Date: Tue, 17 Mar 2020 00:04:48 +0100	[thread overview]
Message-ID: <5905e1da-c4a6-6d9b-d17c-a2dbe1d14033@tarantool.org> (raw)
In-Reply-To: <c7af33d2-94ca-1831-e07b-c49bfa7f8f9b@tarantool.org>

>>> 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 <value1> Meaning.
>>      @retval <value2> 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.

  reply	other threads:[~2020-03-16 23:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 14:06 olegrok
2020-03-15 16:13 ` Vladislav Shpilevoy
2020-03-16 19:05   ` Oleg Babin
2020-03-16 23:04     ` Vladislav Shpilevoy [this message]
2020-03-17 14:19       ` Nikita Pettik
2020-03-17 19:16         ` Oleg Babin
2020-03-17 14:31       ` olegrok
2020-03-17 20:40         ` Nikita Pettik
2020-03-18  6:04           ` Oleg Babin
2020-03-18 13:00             ` Nikita Pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5905e1da-c4a6-6d9b-d17c-a2dbe1d14033@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=babinoleg@mail.ru \
    --cc=korablev@tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox