Lua/LuaClass: Reference the destructor only if the class has one

Allows to bind classes with deleted destructors
This commit is contained in:
Lynix
2016-10-21 17:24:45 +02:00
parent 3f7f12b625
commit d6b6e26d31
2 changed files with 29 additions and 5 deletions

View File

@@ -66,6 +66,9 @@ namespace Nz
void SetStaticSetter(StaticIndexFunc getter);
private:
template<typename T, bool HasDestructor>
friend struct LuaClassImplFinalizerSetupProxy;
void PushClassInfo(LuaInstance& lua);
void SetupConstructor(LuaInstance& lua);
void SetupDefaultToString(LuaInstance& lua);
@@ -75,7 +78,7 @@ namespace Nz
void SetupMetatable(LuaInstance& lua);
void SetupMethod(LuaInstance& lua, LuaCFunction proxy, const String& name, std::size_t methodIndex);
void SetupSetter(LuaInstance& lua, LuaCFunction proxy);
using ParentFunc = std::function<void(LuaInstance& lua, T* instance)>;
using InstanceGetter = std::function<T*(LuaInstance& lua)>;