[Dev-luatex] return value of filter callbacks

Taco Hoekwater taco at elvenkind.com
Fri Nov 5 14:57:25 CET 2010

On 11/05/2010 02:56 PM, Manuel Pégourié-Gonnard wrote:
> Le 05/11/2010 14:52, Taco Hoekwater a écrit :
>> On 11/05/2010 02:46 PM, Manuel Pégourié-Gonnard wrote:
>>> Le 05/11/2010 14:22, Taco Hoekwater a écrit :
>>>> In all these cases the result of returning a boolean is the same:
>>>>      false == callback has failed
>>>>      true == callback has run ok, but nothing has been changed
>>>> the latter case (true) is interesting because it allows a speed
>>>> optimization that can be considerable. I could have sworn this was
>>>> mentioned in the manual, but I cannot find it myself either.
>>> Ok, thanks for the clarification. Just to be sure: in case the function returns
>>> false, and error will be issued, right?
>> Eh ... no. You have to raise an error yourself, if you want that.
> Hum, so what is the purpose of returning false rather than true, if no action is
> taken based on this value?

Oh, now I see this was not clear. Action actually is taken:
the whole node list starting at head is thrown away.

More information about the dev-luatex mailing list