See my other email, I think I've removed the ordering dependency.
We sometimes have to deal with more than one match, otherwise we can't
get ls becuase lsplaylist exists.

On 11 November 2014 19:37, Ben Boeckel <[email protected]> wrote:
> On Tue, Nov 11, 2014 at 19:08:25 +0000, Rory McNamara wrote:
>> Surely that would cause problems based on ordering?
>> For example, if name was ls, and lsplaylist comes after ls in
>> mpc_table (which it does)
>> when we come to the end of our for loop, lsplaylist struct would be in
>> our local copy when the correct
>> match is ls. Also matches would be 2, so the ternary would fail.
>
> No, because we're still counting the number of matches and returning
> NULL if there isn't exactly a single match.
>
>> Admittedly, my implementation is dependant on shorter names being
>> before longer names.
>
> That sounds fragile.
>
> --Ben
_______________________________________________
mpd-devel mailing list
[email protected]
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to