Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: Oleg Babin <babinoleg@mail.ru>, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence
Date: Tue, 17 Mar 2020 14:19:53 +0000	[thread overview]
Message-ID: <20200317141953.GB3221@tarantool.org> (raw)
In-Reply-To: <5905e1da-c4a6-6d9b-d17c-a2dbe1d14033@tarantool.org>

On 17 Mar 00:04, Vladislav Shpilevoy wrote:
> >>> 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.

Okay, np. Oleg, could you please re-send patch with all updates?

  reply	other threads:[~2020-03-17 14:19 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
2020-03-17 14:19       ` Nikita Pettik [this message]
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=20200317141953.GB3221@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=babinoleg@mail.ru \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@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