lua-users home
lua-l archive

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


>Please correct me if I'm wrong, but lua_call pops all the arguments AND
>the function value from the stack.

Yes, that's correct.

>And so I must give the function a
>name, in order to access it more than once...

You can do this or you can leave the function on the stack and duplicate it
with lua_pushvalue or you can store the function in the registry.
--lhf