[Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 17 02:04:48 MSK 2020
>>> 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.
More information about the Tarantool-patches
mailing list