lua-users home
lua-l archive

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


2014-09-02 1:58 GMT+02:00 Rena <hyperhacker@gmail.com>:

> That would simplify returning a value slightly:
>
> return lua_pushinteger(L, 42);
>
> instead of:
> lua_pushinteger(L, 42);
> return 1;

It saves two non-whitespace characters, sometimes a pair
of braces too, at the expense of making life harder for the
person who reads the code. "return 1" is highly likely to be
in a function exported to Lua, "return <expresion>" often
is in a local function.