diff options
author | Nicolas Noble <pixel@nobis-crew.org> | 2013-07-30 19:10:20 -0700 |
---|---|---|
committer | Nicolas Noble <pixel@nobis-crew.org> | 2013-07-30 19:30:09 -0700 |
commit | e7db8576b8a4988dfdd206500199e59c3b57bf55 (patch) | |
tree | de40c83fd7eef3d0c443a7e0d9d670b8b6aace64 /src/BLua.cc | |
parent | babb39375916dc114d3413aa52c9a2c543cad2af (diff) |
Changing things a bit in the Lua binding system. Now pushing a class template means pushing a table by its name, and the constructor is implicit in it.
Diffstat (limited to 'src/BLua.cc')
-rw-r--r-- | src/BLua.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/BLua.cc b/src/BLua.cc index 62e4010..cb0e645 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -382,6 +382,8 @@ void Balau::Lua::declareFunc(const char * name, lua_CFunction f, int i) { checkstack(2); lua_pushstring(L, name); lua_pushcfunction(L, f); + if ((i < 0) && (i > LUA_REGISTRYINDEX)) + i += 2; lua_settable(L, i); } |