@@ -35,9 +35,14 @@ pub struct LuaSharedInterface {
3535 pub lua_setupvalue : extern fn ( state : LuaState , fidx : CInt , idx : CInt ) -> CharBuf ,
3636 pub lua_setfenv : extern fn ( state : LuaState , idx : CInt ) -> CInt ,
3737 pub lua_settable : extern fn ( state : LuaState , idx : CInt ) ,
38+ pub lua_rawset : extern fn ( state : LuaState , idx : CInt ) , // lua_settable but no metamethods called
39+ pub lua_rawseti : extern fn ( state : LuaState , idx : CInt , n : CInt ) , // t[n] = v
3840
3941 // Getters
4042 pub lua_gettable : extern fn ( state : LuaState , idx : CInt ) ,
43+ pub lua_rawget : extern fn ( state : LuaState , idx : CInt ) , // lua_gettable but no metamethods called
44+ pub lua_rawgeti : extern fn ( state : LuaState , idx : CInt , n : CInt ) , // lua_gettable but no metamethods called
45+
4146 pub lua_getfield : extern fn ( state : LuaState , idx : CInt , key : CharBuf ) ,
4247 pub lua_getupvalue : extern fn ( state : LuaState , fidx : CInt , idx : CInt ) -> CharBuf ,
4348 pub lua_type : extern fn ( state : LuaState , idx : CInt ) -> CInt ,
@@ -73,19 +78,26 @@ pub struct LuaSharedInterface {
7378 pub luaL_checkany : extern fn ( state : LuaState , narg : CInt ) ,
7479 pub luaL_checktype : extern fn ( state : LuaState , narg : CInt , typeid : CInt ) ,
7580 pub luaL_checkudata : extern fn ( state : LuaState , narg : CInt , len : SizeT ) ,
76- pub luaL_argcheck : extern fn ( state : LuaState , cond : CInt , narg : CInt , msg : CharBuf ) ,
7781
7882 // Creation
7983 pub luaL_newstate : extern fn ( ) -> LuaState ,
8084 pub lua_createtable : extern fn ( state : LuaState , narr : CInt , nrec : CInt ) ,
8185
86+ // Destruction
87+ pub lua_close : extern fn ( state : LuaState ) , // Destroys the lua state
88+
8289 // JIT
8390 // Returns 1 for success, 0 for failure
8491 pub luaJIT_setmode : extern fn ( state : LuaState , idx : CInt , jit_mode : CInt ) -> CInt ,
8592
86- // Coroutines / Yielding
93+ // Coroutines
8794 pub lua_yield : extern fn ( state : LuaState , nresults : CInt ) -> CInt ,
8895 pub lua_status : extern fn ( state : LuaState ) -> CInt ,
96+ pub lua_resume_real : extern fn ( state : LuaState , narg : CInt ) -> CInt ,
97+
98+ // Comparison
99+ pub lua_equal : extern fn ( state : LuaState , ind1 : CInt , ind2 : CInt ) -> CInt , // Returns 1 or 0 bool
100+ pub lua_rawequal : extern fn ( state : LuaState , ind1 : CInt , ind2 : CInt ) -> CInt ,
89101
90102 // Raising Errors
91103 pub luaL_typerror : extern fn ( state : LuaState , narg : CInt , typename : CharBuf ) -> CInt ,
@@ -116,6 +128,9 @@ impl LuaSharedInterface {
116128 pub fn lua_tostring ( & self , state : LuaState , idx : CInt ) -> CharBuf {
117129 self . lua_tolstring ( state, idx, 0 )
118130 }
131+ pub fn lua_resume ( & self , state : LuaState , narg : CInt ) -> CInt {
132+ self . lua_resume_real ( state, narg)
133+ }
119134}
120135
121136// Global Static Stuff
0 commit comments