[vlc-devel] [RFC 3/3] vlc_arrays: append items in amortized O(1)

Filip Roséen filip at atch.se
Fri Jul 20 23:11:19 CEST 2018

Hi Steve,

On 2018-07-20 13:54, Steve Lhomme wrote:
> I disagree. VLC_Exxx and VLC_SUCCESS are for functions and even VLC_API functions that
> return an int.

It was a note related to the entire patch, that happened to appear at
a function where `-1` does not denote error. I understand that you
might interpret what I wrote as if I am saying that `vlc_array_find`
should use *error-codes*, but honestly I thought you'd know be better
than that. `;-)`

Though, it was not entire clear from what I was writing so for that I

> Here we return an invalid array index which may have its own define but is not an error
> code. But maybe I misread because the -1 is not even from this commit.

It was unfortunate that I wrote it under the function that is supposed
to find the index of an item; I do agree that `vlc_array_find` not
finding an element is not an error, and for what it is worth me and
Romain spoke about this on *IRC*.

Best Regards,\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180720/2ef4f468/attachment.html>

More information about the vlc-devel mailing list