diff options
author | chai <chaifix@163.com> | 2018-08-14 09:26:22 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-14 09:26:22 +0800 |
commit | 5162f84be0a4deb447c6ba1226722b049335d525 (patch) | |
tree | 5f7ed0ddc05b1499eaf0607b88fd5cb5e2a961c1 /src/lua/net/luaopen_Buffer.cpp | |
parent | 636e766791dc8680d237fafe4ff6dd904e16a860 (diff) |
*update
Diffstat (limited to 'src/lua/net/luaopen_Buffer.cpp')
-rw-r--r-- | src/lua/net/luaopen_Buffer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/net/luaopen_Buffer.cpp b/src/lua/net/luaopen_Buffer.cpp index 9278544..68e377b 100644 --- a/src/lua/net/luaopen_Buffer.cpp +++ b/src/lua/net/luaopen_Buffer.cpp @@ -108,7 +108,15 @@ namespace net return 2; } + static int l_gc(lua_State* L) + { + Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_NETWORK_BUFFER); + proxy->release<Buffer>(); + return 0; + } + static const luaL_Reg netbuffer_function[] = { + { "__gc", l_gc }, { "append", l_append }, { "grabString", l_grabString }, { "grabInteger", l_grabInteger }, |