GNOME Bugzilla – Bug 795156
gstqueuearray: make find() return a 0-based index
Last modified: 2018-04-13 22:03:14 UTC
See commit message
Created attachment 370791 [details] [review] gstqueuearray: make find() return a 0-based index And make the drop() functions expect a 0-based index too, this addresses a longstanding FIXME.
Comment on attachment 370791 [details] [review] gstqueuearray: make find() return a 0-based index I would like to see a small unit test addition for this as well please, since it's currently not tested. The commit message should also mention why/that this change in interpretation of the index argument to _drop_*() is not a backwards-incompatible change (because it could only be used with return values from _find anyway).
(In reply to Tim-Philipp Müller from comment #2) > Comment on attachment 370791 [details] [review] [review] > gstqueuearray: make find() return a 0-based index > > I would like to see a small unit test addition for this as well please, > since it's currently not tested. There is a test that uses find() and drop_element(), test_array_drop2, I figured this was sufficient? > > The commit message should also mention why/that this change in > interpretation of the index argument to _drop_*() is not a > backwards-incompatible change (because it could only be used with return > values from _find anyway). sure, I'll update that
Ah ok, ignore me then. Must up my grepping-fu then.
Created attachment 370860 [details] [review] gstqueuearray: make find() return a 0-based index And make the drop() functions expect a 0-based index too, this addresses a longstanding FIXME. This will not break backward incompatible change, because the drop() functions were previously only meant to be used with the index returned by find().
Attachment 370860 [details] pushed as 68761ee - gstqueuearray: make find() return a 0-based index