[MPlayer-dev-eng] expand_property wrong code or wrong document?
Ulion
ulion2002 at gmail.com
Mon Dec 17 16:32:07 CET 2007
2007/12/17, Alban Bedel <albeu at free.fr>:
> On Mon, 17 Dec 2007 10:28:09 +0800
> Ulion <ulion2002 at gmail.com> wrote:
>
> > Hello,
> >
> > $(NAME:TEXT) in document while ?(NAME:TEXT) in code
> > Which one should it be?
>
> Obviously the documentation is wrong, my bad.
OK, document fixed.
>
> > Also by the code a property should return unavaiable for a get request
> > if it is unavaiable even when arg is NULL, then I have to at least fix
> > chapter property for this...
>
> Yes, that's how a property can be tested for readability. The logic is
> that UNAVAILABLE is a global status independent of the requested
> action, so it should be tested before processing ANY action.
>
> Note that this apply to writing too, passing a NULL argument can be
> used to test writability. So similarily the property should check if
> it's writable (and return DISABLED if not) before checking if the
> argument is there.
>
> When I wrote this, I thought that would work because ppl would just
> copy/paste the code like they do everywhere. But it seems the code
> look too simple and most ppl then insist on "optimizing" it, breaking
> half the API in the process :(
Oh, I known, then I will fix one when I need to use one of them.
--
Ulion
More information about the MPlayer-dev-eng
mailing list