Skip to content

Commit 4a5f946

Browse files
committed
Make Lua an opqaque
Rather than storing a *LuaState inside the Lua struct, this changes Lua to be an opaque type that directly represents the memory passed to a Lua struct. Internally, this makes a few things slightly less readable. @ptrCast(lua) and @as(*LuaState, @ptrCast(lua)) are required when passing data to the c functions. But externally, this makes more sense. The value returned from Lua.init() is always a pointer now, and represents the Lua state itself.
1 parent 59006a2 commit 4a5f946

File tree

2 files changed

+296
-301
lines changed

2 files changed

+296
-301
lines changed

0 commit comments

Comments
 (0)