-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
lua_pushcclosure should push the parent lua_State as the first upvalue and a "function specifier" as the second upvalue.
the passed lua function should go on the parent lua_State's registry, and that's where the "function specifier" comes from.
lua_pushcclosure(function(L)
print(L)
print("virtualization!")
return 0
end)debug.* API wouldn't get much from those C closures, making this an effective sandbox.
tylerneylon