aboutsummaryrefslogtreecommitdiff
path: root/src/lua/common/Reference.hpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-14 22:52:40 +0800
committerchai <chaifix@163.com>2018-10-14 22:52:40 +0800
commitb1bbc998960fff2169dc5a992c47d08723472f9b (patch)
tree220f3bd5de2266e248884e11161dd715d7632ef2 /src/lua/common/Reference.hpp
parentfbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff)
*直接渲染字符串
Diffstat (limited to 'src/lua/common/Reference.hpp')
-rw-r--r--src/lua/common/Reference.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lua/common/Reference.hpp b/src/lua/common/Reference.hpp
index feb96bb..bd9dc24 100644
--- a/src/lua/common/Reference.hpp
+++ b/src/lua/common/Reference.hpp
@@ -23,6 +23,16 @@ namespace lua
// object type string
const char* const type;
+ void setUserdata(void* data)
+ {
+ userdata = data;
+ }
+
+ void* getUserdata()
+ {
+ return userdata;
+ }
+
protected:
RefBase(void* obj, const char* t)
: count(1)
@@ -39,7 +49,7 @@ namespace lua
void* object;
int count;
-
+ void* userdata;
};
template<class T>