[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: stack and arguments of C functions
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 30 Oct 2002 10:13:17 -0300
>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