lua-users home
lua-l archive

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


>What is the official behaviour ? Do C functions have to explicitly check the
>number of arguments before getting them ?

The protocol is that the number of arguments received is returned by calling
lua_gettop at the start of the function. Also, before converting Lua values to
C values with lua_to* you must be sure of their types, by calling lua_type.
--lhf