I've tryied to invert the order, like this lua_getref(l, tab) lua_getref(l, func) lua_call(l, 1) and it worked! Is that right? I mean, tab is put on the stack, then func. after the call of lua_call, the stack is in the correct state?