lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Perhaps it's better to just add a third call argument with the status, and tolerate the non-intuitive ordering.

I haven't looked at the implementation, but a bigger question may be whether the status is available to the code currently invoking __close.

On Sun, Sep 25, 2022 at 10:34 PM Lars Müller <> wrote:
Another possible solution would be to pass no value as second argument
to __close.

On 25.09.22 14:51, John Belmonte wrote:
> Since the manual says "nil and false are ignored as to-be-closed
> values", I wonder if the first arg of __close can be overloaded to
> convey the error case, by the value false, which otherwise can't happen.