diff options
author | dartraiden <wowemuh@gmail.com> | 2018-07-10 17:35:35 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2018-07-10 17:35:54 +0300 |
commit | 8b981c349ce9489de8c3866bac909f091bb41f8c (patch) | |
tree | 15bdc666c02c9504bd078553007b1f3e4b4f13e6 /libs | |
parent | 98487dbc5b2650a1f17bd9454e4d0a6b966c033d (diff) |
liblua: pick up Miranda-specific commits
Diffstat (limited to 'libs')
-rw-r--r-- | libs/liblua/include/lua.hpp | 6 | ||||
-rw-r--r-- | libs/liblua/src/lstate.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libs/liblua/include/lua.hpp b/libs/liblua/include/lua.hpp index ec417f5946..4030829227 100644 --- a/libs/liblua/include/lua.hpp +++ b/libs/liblua/include/lua.hpp @@ -3,7 +3,7 @@ // <<extern "C">> not supplied automatically because Lua also compiles as C++ extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" +#include "../src/lua.h" +#include "../src/lualib.h" +#include "../src/lauxlib.h" } diff --git a/libs/liblua/src/lstate.c b/libs/liblua/src/lstate.c index c1a76643c3..8815afb95f 100644 --- a/libs/liblua/src/lstate.c +++ b/libs/liblua/src/lstate.c @@ -339,6 +339,9 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { LUA_API void lua_close (lua_State *L) { + if (!L) + return; + L = G(L)->mainthread; /* only the main thread can be closed */ lua_lock(L); close_state(L); |