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 10
10
#include " SourceCompat.h"
11
11
12
12
struct lua_State ;
13
+ struct lua_Debug ;
13
14
14
15
namespace GarrysMod
15
16
{
@@ -24,6 +25,8 @@ namespace GarrysMod
24
25
int luaL_typerror ( lua_State *L, int narg, const char *tname );
25
26
const void *lua_topointer ( lua_State *L, int idx );
26
27
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 );
27
30
}
28
31
29
32
typedef int ( *CFunc )( lua_State* L );
@@ -430,6 +433,18 @@ namespace GarrysMod
430
433
return static_cast <int >( INDEX_GLOBAL ) - iPos;
431
434
}
432
435
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
+
433
448
private:
434
449
lua_State *state;
435
450
};
You can’t perform that action at this time.
0 commit comments