diff options
author | chai <chaifix@163.com> | 2019-01-14 16:40:14 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-14 16:40:14 +0800 |
commit | 98c9825c49a1674f59eafb3253829ca7d5cac3c1 (patch) | |
tree | bdd2a6da72fc998ff884b011a2260dc72537c25f /src/libjin-lua/common/je_lua_reference.cpp | |
parent | 8b00d67febf133e89f6a0bfabc41feed555dc4a9 (diff) |
*rename source file
Diffstat (limited to 'src/libjin-lua/common/je_lua_reference.cpp')
-rw-r--r-- | src/libjin-lua/common/je_lua_reference.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/libjin-lua/common/je_lua_reference.cpp b/src/libjin-lua/common/je_lua_reference.cpp deleted file mode 100644 index 72c1c3e..0000000 --- a/src/libjin-lua/common/je_lua_reference.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "common/je_lua.h" - -#include "je_lua_reference.h" - -namespace JinEngine -{ - namespace Lua - { - - LuaRef::LuaRef(lua_State* L, int i) - : mL(L) - { - // Get value. - luax_pushvalue(mL, i); - // Set reference. - luax_getreferencestable(L); - luax_pushvalue(mL, -2); - mIndex = luax_ref(mL, -2); - luax_pop(L, 3); - } - - LuaRef::~LuaRef() - { - unref(); - } - - void LuaRef::unref() - { - luax_getreferencestable(mL); - luax_unref(mL, -1, mIndex); - luax_pop(mL, 1); - } - - void LuaRef::push() - { - luax_getreferencestable(mL); - luax_rawgeti(mL, -1, mIndex); - luax_remove(mL, -2); - } - - } -}
\ No newline at end of file |