From 22bb9b537caff927ef8c83bde82d58253ffbb1e4 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 18 Aug 2018 22:15:27 +0800 Subject: *update --- src/lua/common/Proxy.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lua/common/Proxy.h') diff --git a/src/lua/common/Proxy.h b/src/lua/common/Proxy.h index 60658ec..8323ead 100644 --- a/src/lua/common/Proxy.h +++ b/src/lua/common/Proxy.h @@ -11,12 +11,11 @@ namespace lua class Proxy { public: - void bind(Reference* ref, const char* t) + void bind(RefBase* ref) { if (ref == nullptr) return; reference = ref; - type = t; } void release() @@ -25,7 +24,6 @@ namespace lua { reference->release(); reference = nullptr; - type = nullptr; } } @@ -35,8 +33,12 @@ namespace lua return *(Ref*) reference; } - const char* type; // type name and metatable name - Reference* reference; // acctual object binded + const char* getObjectType() + { + return reference->type; + } + + RefBase* reference; }; -- cgit v1.1-26-g67d0