diff options
author | chai <chaifix@163.com> | 2018-11-26 16:52:14 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-26 16:52:14 +0800 |
commit | 380daad668cd288d98970cdd76d920e3fbf6a374 (patch) | |
tree | 667ffc003e026da18e7c9b10fc3e32bd24e490e9 /src/lua/common/je_lua_shared.cpp | |
parent | f49291959d22b9f05f0c19a31c3f9a8905805014 (diff) |
*lua bind
Diffstat (limited to 'src/lua/common/je_lua_shared.cpp')
-rw-r--r-- | src/lua/common/je_lua_shared.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lua/common/je_lua_shared.cpp b/src/lua/common/je_lua_shared.cpp index b95d1a0..076f176 100644 --- a/src/lua/common/je_lua_shared.cpp +++ b/src/lua/common/je_lua_shared.cpp @@ -6,6 +6,19 @@ namespace JinEngine namespace Lua { + SharedBase::SharedBase(lua_State* L, void* obj, const char* t) + : mCount(0) + , mObject(obj) + , mL(L) + , mType(t) + { + } + + SharedBase::~SharedBase() + { + clearDependencies(); + } + void SharedBase::retain() { ++mCount; @@ -87,7 +100,7 @@ namespace JinEngine return strcmp(mType, t) == 0; } - int SharedBase::getDependencyCount() + int SharedBase::getDependenciesCount() { return mDependencies.size(); } |