lua-users home
lua-l archive

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


c function called from lua that supposed to return nil,
can I simplify code by return 0, instead of lua_pushnil(L); return 1 ?

Seems both accomplish the same thing.

function no_return () end

= no_return() == nil
true

x = 123
x = no_return()
= x
nil