diff options
author | chai <chaifix@163.com> | 2018-05-18 14:39:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-05-18 14:39:38 +0800 |
commit | 1b773ad2c250e09c09c065eb3eec64bfebde09ca (patch) | |
tree | b3f1f367694d5f86cc0caa7f4eea2e6a1d3424c5 /src/script/luaopen_types.h | |
parent | 91a592da979827b1735901388dba8712e6e3ecf3 (diff) |
修改userdata创建方式
Diffstat (limited to 'src/script/luaopen_types.h')
-rw-r--r-- | src/script/luaopen_types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/script/luaopen_types.h b/src/script/luaopen_types.h index 292d991..8c1f2a6 100644 --- a/src/script/luaopen_types.h +++ b/src/script/luaopen_types.h @@ -10,4 +10,16 @@ // audio module #define TYPE_SOUND "Sound" +class Proxy +{ +public: + inline void bind(void* obj) + { + if (obj != 0 && obj != nullptr) + object = obj; + } + + void* object; +}; + #endif |