lua-users home
lua-l archive

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


> In lvm.c if the target of OP_CALL is a Lua function then it is handled
> by the same invocation of luaV_execute(). When I compile a Lua
> function I cannot do this so I need to recursively invoke
> luaV_execute() on the called function. I was wondering if I should
> directly call luaV_execute() or call luaD_call() - what would be the
> correct approach?

Probably luaD_call, but depends on your code. luaD_call handles C
functions, controls the stack depth, and controls yields. Probably
you want all of them.

-- Roberto