lua-users home
lua-l archive

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


> > how can i typecheck the result then - i thought that
> > luaL_check_int() would be sufficient to verify that
> > the return value (at stack index 1) was an integer ?
>
> Use lua_isnumber(L, -1).

By the way, the stack index of the return value may or may not be 1, but
it is definitely -1 (-1 is top os stack).