lua-users home
lua-l archive

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


* Charles Curran:

> I've run into a surprise in the C API.  I have this code in Lua:
>
> construct(...)
>
> but when I try and operate on the arguments in C++
>
> int construct(lua_State* L)
> {
>    int stack_size = lua_gettop(L);
>    ....
>    return 0;
> }
>
> the value of stack_size here is 0, no matter how many arguments are passed
> into the function construct in Lua.  Is it not possible to process var-args
> from the C API?

It is.  Could you post a minimal, complete example which exhibits the
problem?