From b1bbc998960fff2169dc5a992c47d08723472f9b Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 14 Oct 2018 22:52:40 +0800 Subject: =?UTF-8?q?*=E7=9B=B4=E6=8E=A5=E6=B8=B2=E6=9F=93=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/common/Proxy.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lua/common/Proxy.h') diff --git a/src/lua/common/Proxy.h b/src/lua/common/Proxy.h index 101fe9c..643dd48 100644 --- a/src/lua/common/Proxy.h +++ b/src/lua/common/Proxy.h @@ -27,6 +27,18 @@ namespace lua } } + void retain() + { + if (reference != nullptr) + reference->retain(); + } + + void setUserdata(void* data) + { + if (reference != nullptr) + reference->setUserdata(data); + } + template Ref& getRef() { -- cgit v1.1-26-g67d0