File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1010#include " SourceCompat.h"
1111
1212struct lua_State ;
13+ struct lua_Debug ;
1314
1415namespace GarrysMod
1516{
@@ -24,6 +25,8 @@ namespace GarrysMod
2425 int luaL_typerror ( lua_State *L, int narg, const char *tname );
2526 const void *lua_topointer ( lua_State *L, int idx );
2627 int luaL_callmeta ( lua_State *L, int idx, const char *e );
28+ int lua_getstack ( lua_State *L, int level, lua_Debug *ar );
29+ int lua_getinfo ( lua_State *L, const char *what, lua_Debug *ar );
2730 }
2831
2932 typedef int ( *CFunc )( lua_State* L );
@@ -430,6 +433,18 @@ namespace GarrysMod
430433 return static_cast <int >( INDEX_GLOBAL ) - iPos;
431434 }
432435
436+ // Get information about the interpreter runtime stack
437+ inline int GetStack ( int level, lua_Debug *ar )
438+ {
439+ return lua_getstack ( state, level, ar );
440+ }
441+
442+ // Returns information about a specific function or function invocation
443+ inline int GetInfo ( const char *what, lua_Debug *ar )
444+ {
445+ return lua_getinfo ( state, what, ar );
446+ }
447+
433448 private:
434449 lua_State *state;
435450 };
You can’t perform that action at this time.
0 commit comments