aboutsummaryrefslogtreecommitdiff
path: root/src/LuaRuntime.hpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-05 11:49:48 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-05 13:10:39 +0530
commit2e051fcc4efcfe6af2d3ef22d6a4ba63c9f1c65d (patch)
treebbea54f175105a4167f1d07ca50a4a10632b38a2 /src/LuaRuntime.hpp
parent7e09b35b008f58809ac56184a4f83ab875c038e0 (diff)
downloadnull-browser-2e051fcc4efcfe6af2d3ef22d6a4ba63c9f1c65d.tar.gz
null-browser-2e051fcc4efcfe6af2d3ef22d6a4ba63c9f1c65d.zip
Add package path to lua (only current build dir)
Diffstat (limited to 'src/LuaRuntime.hpp')
-rw-r--r--src/LuaRuntime.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/LuaRuntime.hpp b/src/LuaRuntime.hpp
index 74b7810..2b834aa 100644
--- a/src/LuaRuntime.hpp
+++ b/src/LuaRuntime.hpp
@@ -10,10 +10,16 @@
#include "utils.hpp"
#include "widgets/WebViewStack.hpp"
+#ifndef PROJECT_LUA_PATH
+#define PROJECT_LUA_PATH ""
+#endif
+
#define preserve_top(STATE, BODY) \
- const int __top = lua_gettop(STATE); \
- BODY; \
- lua_settop(STATE, __top);
+ { \
+ const int __top = lua_gettop(STATE); \
+ BODY; \
+ lua_settop(STATE, __top); \
+ };
class LuaRuntime : public QObject {
Q_OBJECT