diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-01 00:15:47 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-01 00:19:21 +0100 |
commit | 3699ebd1770218368902469a32daf13ce6057408 (patch) | |
tree | 2cf8c645bf46b8ffd8b570fbb9ae0ef6feda6671 /include/BLua.h | |
parent | 137e20e9667287541991e4196097bd48fae3a2f0 (diff) |
Trying to better cleanup the stack after the various opens.
Diffstat (limited to 'include/BLua.h')
-rw-r--r-- | include/BLua.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/BLua.h b/include/BLua.h index 1ae977f..c12a8b7 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -78,7 +78,7 @@ class Lua : public Base { void open_dir(); void open_bit(); void open_jit(); - int wrap_open(openlualib_t open) { return open(L); } + int wrap_open(openlualib_t open) { int n = gettop(); int r = open(L); for(remove(n); n <= gettop(); remove(n));} void declarefunc(const String &, lua_CFunction, int = LUA_GLOBALSINDEX); void call(const String &, int = LUA_GLOBALSINDEX, int = 0, int = 0); void call(int = 0, int = 0) throw (GeneralException); |