diff options
Diffstat (limited to 'source/core/StarLua.cpp')
-rw-r--r-- | source/core/StarLua.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/core/StarLua.cpp b/source/core/StarLua.cpp index 4499ebc..73955f2 100644 --- a/source/core/StarLua.cpp +++ b/source/core/StarLua.cpp @@ -461,6 +461,13 @@ ByteArray LuaEngine::compile(ByteArray const& contents, String const& name) { return compile(contents.ptr(), contents.size(), name.empty() ? nullptr : name.utf8Ptr()); } +lua_Debug const& LuaEngine::debugInfo(int level, const char* what) { + lua_Debug& debug = m_debugInfo = lua_Debug(); + lua_getstack(m_state, level, &debug); + lua_getinfo(m_state, what, &debug); + return debug; +} + LuaString LuaEngine::createString(String const& str) { lua_checkstack(m_state, 1); |