@@ -117,6 +117,7 @@ expose_symbol!( lua_pushcclosure, (), (state: LuaState, fnc: LuaCFunction, idx:
117117expose_symbol ! ( lua_pushlightuserdata, ( ) , ( state: LuaState , p: * mut CVoid ) ) ;
118118expose_symbol ! ( lua_pushthread, ( ) , ( state: LuaState ) ) ;
119119expose_symbol ! ( lua_pushfstring, CharBuf , ( state: LuaState , fmt: CharBuf , ...) ) ;
120+ expose_symbol ! ( lua_pushinteger, ( ) , ( state: LuaState , n: LuaInteger ) ) ;
120121
121122// Type Checks
122123expose_symbol ! ( luaL_checkinteger, LuaInteger , ( state: LuaState , narg: CInt ) ) ;
@@ -139,6 +140,11 @@ expose_symbol!( lua_close, (), (state: LuaState) ); // Destroys the lua state
139140// JIT
140141// Returns 1 for success, 0 for failure
141142expose_symbol ! ( luaJIT_setmode, CInt , ( state: LuaState , idx: CInt , jit_mode: CInt ) ) ;
143+ expose_symbol ! ( luaJIT_profile_stop, ( ) , ( state: LuaState ) ) ;
144+
145+ type LuaJITProfileCallback = extern "C" fn ( data : * mut CVoid , l : LuaState , samples : CInt , vmstate : CInt ) -> ( ) ;
146+ expose_symbol ! ( luaJIT_profile_start, ( ) , ( state: LuaState , mode: CharBuf , cb: LuaJITProfileCallback , data: * mut CVoid ) ) ;
147+ expose_symbol ! ( luaJIT_profile_dumpstack, CharBuf , ( state: LuaState , fmt: CharBuf , depth: CInt , len: SizeT ) ) ;
142148
143149// Coroutines
144150expose_symbol ! ( lua_yield, CInt , ( state: LuaState , nresults: CInt ) ) ;
@@ -174,6 +180,34 @@ expose_symbol!( luaL_unref, (), (state: LuaState, t: CInt, r: CInt) );
174180// Metatables
175181expose_symbol ! ( luaL_newmetatable, CInt , ( state: LuaState , tname: CharBuf ) ) ;
176182expose_symbol ! ( luaL_newmetatable_type, CInt , ( state: LuaState , tname: CharBuf , typ: CInt ) ) ;
183+ expose_symbol ! ( luaL_getmetafield, CInt , ( state: LuaState , obj: CInt , e: CharBuf ) ) ;
184+
185+ // Optional / Default to ``d``
186+ expose_symbol ! ( luaL_optinteger, CInt , ( state: LuaState , narg: CInt , d: LuaInteger ) ) ;
187+ expose_symbol ! ( luaL_optlstring, CharBuf , ( state: LuaState , arg: CInt , d: CharBuf , l: SizeT ) ) ;
188+ expose_symbol ! ( luaL_optnumber, LuaNumber , ( state: LuaState , arg: CInt , d: LuaNumber ) ) ;
189+
190+ // x / ref functions
191+ expose_symbol ! ( lua_tointegerx, LuaInteger , ( state: LuaState , index: CInt , isnum: * mut CInt ) ) ;
192+ expose_symbol ! ( lua_tonumberx, LuaNumber , ( state: LuaState , index: CInt , isnum: * mut CInt ) ) ;
193+
194+ // Debug
195+ expose_symbol ! ( luaL_traceback, ( ) , ( state: LuaState , state1: LuaState , msg: CharBuf , level: CInt ) ) ;
196+ expose_symbol ! ( luaL_where, ( ) , ( state: LuaState , lvl: CInt ) ) ;
197+
198+ // Misc
199+ expose_symbol ! ( luaL_testudata, ( ) , ( state: LuaState , arg: CInt , tname: CharBuf ) ) ;
200+ expose_symbol ! ( luaL_execresult, CInt , ( state: LuaState , stat: CInt ) ) ;
201+ expose_symbol ! ( luaL_fileresult, CInt , ( state: LuaState , stat: CInt , fname: CharBuf ) ) ;
202+ expose_symbol ! ( luaL_findtable, CharBuf , ( state: LuaState , idx: CInt , fname: CharBuf , szhint: CInt ) ) ;
203+
204+ // luaL_Buffer
205+ expose_symbol ! ( luaL_buffinit, ( ) , ( state: LuaState , b: * mut LuaL_Buffer ) ) ;
206+ expose_symbol ! ( luaL_prepbuffer, * mut i8 , ( b: * mut LuaL_Buffer ) ) ;
207+
208+ // String methods
209+ expose_symbol ! ( luaL_gsub, CharBuf , ( s: CharBuf , pattern: CharBuf , replace: CharBuf ) ) ;
210+
177211
178212#[ inline( always) ]
179213pub fn lua_pop ( state : LuaState , ind : CInt ) {
0 commit comments