improve pushEngine

This commit is contained in:
Syping 2018-08-22 21:42:39 +02:00
parent fbcdbbc524
commit 6cd4614371
3 changed files with 11 additions and 8 deletions

11
.gitignore vendored
View file

@ -1,6 +1,3 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
@ -18,7 +15,6 @@
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
@ -30,3 +26,10 @@
*.exe
*.out
*.app
# Qt project user file
*.pro.user
# Gettext translation files
*.po
*.pot

View file

@ -34,12 +34,12 @@ LuaEngineGui::LuaEngineGui(QObject *parent, bool loadBaseLibraries) : LuaEngine(
{
L = luaState();
pushClass(L);
pushEngine();
pushEngine(L);
}
void LuaEngineGui::pushEngine()
void LuaEngineGui::pushEngine(lua_State *L_p)
{
pushPointer("__LuaEngineGui", (void*)this);
pushPointer(L_p, "__LuaEngineGui", (void*)this);
}
void LuaEngineGui::pushClass(lua_State *L_p)

View file

@ -28,7 +28,7 @@ class LUAENGINEGUISHARED_EXPORT LuaEngineGui : public LuaEngine
Q_OBJECT
public:
LuaEngineGui(QObject *parent = nullptr, bool loadBaseLibraries = true);
void pushEngine();
void pushEngine(lua_State *L_p);
static void pushClass(lua_State *L_p);
static void pushClass(LuaEngine *luaEngine);
static int showMessageBox(lua_State *L_p);