Skip to content

Support lua_pushcclosure #3

@SoniEx2

Description

@SoniEx2

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions