[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: use of gettop to change functionality
- From: Tony Finch <dot@...>
- Date: Tue, 1 Mar 2011 15:43:19 +0000
On Tue, 1 Mar 2011, Luiz Henrique de Figueiredo wrote:
> > The entire point was not to treat nil and none as the same?
> BTW, the idiom for that is to call lua_settop(L,n) at the very start,
> for functions that require n arguments. This discards extra arguments
> and make sure that absent ones are replaced by nil.
Er, yes, Roberto is right that that patch was a quick hack in need of more
Thank you Luiz for reminding me of the right idiom.
f.anthony.n.finch <email@example.com> http://dotat.at/
Viking, North Utsire: Southerly or southwesterly 4 or 5, increasing 5 to 7,
perhaps gale 8 later. Moderate becoming rough, occasionally very rough in
north. Mainly fair. Moderate or good.