use sproto global slot

This commit is contained in:
Cloud Wu
2015-02-28 13:33:56 +08:00
parent 318ee300e3
commit 688cc843ce
8 changed files with 86 additions and 40 deletions

View File

@@ -12,8 +12,8 @@ function sproto_mt:__gc()
core.deleteproto(self.__cobj)
end
function sproto.new(pbin)
local cobj = assert(core.newproto(pbin))
function sproto.new(...)
local cobj = assert(core.newproto(...))
local self = {
__cobj = cobj,
__tcache = setmetatable( {} , weak_mt ),