[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Proposal: lua_pushfoo() should return 1
- From: Hao Wu <wuhao.wise@...>
- Date: Mon, 1 Sep 2014 17:29:10 -0700
On Monday, September 1, 2014, Rena <hyperhacker@gmail.com> wrote:
More accurately, it should return the number of values it pushed,
which for most push functions will always be 1.
That would simplify returning a value slightly:
return lua_pushinteger(L, 42);
instead of:
lua_pushinteger(L, 42);
return 1;
How about
return (lua_pusxx(), 1)
--
Sent from my Game Boy.