diff --git a/builtin/ConfGlue.lua b/builtin/ConfGlue.lua index 95ca4ed..f4aedf1 100644 --- a/builtin/ConfGlue.lua +++ b/builtin/ConfGlue.lua @@ -5,3 +5,5 @@ args = args and luar.slice2table(args) srv = srv or require("wrappers.srv") require("wrappers.mw") + +require("wrappers.init") diff --git a/builtin/libs/msgpack.lua b/builtin/libs/msgpack.lua index 9d5ca30..bee8822 100644 --- a/builtin/libs/msgpack.lua +++ b/builtin/libs/msgpack.lua @@ -34,6 +34,17 @@ msgpack.packers['table'] = function(buffer, t) end end +-- Userdata +msgpack.packers['userdata'] = function(buffer, ud) + -- Hack. A big one, too. + local idpool = "tmp:msgpack:ud-tmp" + kvstore.inc(idpool) + local numid = kvstore.get(idpool) + local id = idpool..":"..tostring(numid) + kvstore.set(id, ud) + msgpack.packers['ext'](buffer, 43, tostring(numid)) +end + -- Unpacker for both msgpack.build_ext = function (tag, data) if tag == 7 then -- Function @@ -49,6 +60,11 @@ msgpack.build_ext = function (tag, data) local _, t = f() local _, mt = f() return setmetatable(t, mt) + elseif tag == 43 then -- Userdata. Big hack. + local id = "tmp:msgpack:ud-tmp:"..data + local ud = kvstore.get(id) + kvstore.del(id) + return ud end end diff --git a/builtin/libs/thread.lua b/builtin/libs/thread.lua index d67278b..4a0d463 100644 --- a/builtin/libs/thread.lua +++ b/builtin/libs/thread.lua @@ -10,7 +10,7 @@ function thread.spawn(code, bindings, buffer, dontusemsgpack) elseif type(code) == "string" then fn, err = loadstring(code) if err then - error(err) + error(err, 0) end end local buffer = tonumber(buffer) or -1 diff --git a/builtin/libs/wrappers/init.lua b/builtin/libs/wrappers/init.lua new file mode 100644 index 0000000..35b70e2 --- /dev/null +++ b/builtin/libs/wrappers/init.lua @@ -0,0 +1,2 @@ +-- Init Glue for Config State +kvstore.set("tmp:msgpack:ud-tmp", 0) diff --git a/modules/glue/generated_lua.go b/modules/glue/generated_lua.go index b9f889e..41de04c 100644 --- a/modules/glue/generated_lua.go +++ b/modules/glue/generated_lua.go @@ -17,6 +17,7 @@ // builtin/libs/template.lua // builtin/libs/thread.lua // builtin/libs/wrappers/globalwrappers.lua +// builtin/libs/wrappers/init.lua // builtin/libs/wrappers/mw.lua // builtin/libs/wrappers/srv.lua // DO NOT EDIT! @@ -86,7 +87,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _confglueLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd5\x55\x70\xce\xcf\x4b\xcb\x4c\x57\x70\xcf\x29\x4d\xe5\xe2\x4a\x2c\x4a\x2f\x56\xb0\x55\x00\x53\x89\x79\x29\x0a\x39\xa5\x89\x45\x7a\xc5\x39\x99\xc9\xa9\x46\x25\x89\x49\x39\xa9\x1a\x20\x19\x4d\x2e\xae\xe2\xa2\x32\xa0\x32\x10\x99\x5f\xa4\x50\x94\x5a\x58\x9a\x59\x94\xaa\xa1\x54\x5e\x94\x58\x50\x90\x5a\x54\xac\x07\x94\x50\x02\xaa\xc2\x94\xc8\x2d\x07\x8a\x03\x02\x00\x00\xff\xff\xc7\x8e\x2a\x4d\x75\x00\x00\x00") +var _confglueLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd5\x55\x70\xce\xcf\x4b\xcb\x4c\x57\x70\xcf\x29\x4d\xe5\xe2\x4a\x2c\x4a\x2f\x56\xb0\x55\x00\x53\x89\x79\x29\x0a\x39\xa5\x89\x45\x7a\xc5\x39\x99\xc9\xa9\x46\x25\x89\x49\x39\xa9\x1a\x20\x19\x4d\x2e\xae\xe2\xa2\x32\xa0\x32\x10\x99\x5f\xa4\x50\x94\x5a\x58\x9a\x59\x94\xaa\xa1\x54\x5e\x94\x58\x50\x90\x5a\x54\xac\x07\x94\x50\x02\xaa\xc2\x94\xc8\x2d\xc7\x2e\x9e\x99\x97\x59\x02\x94\x01\x04\x00\x00\xff\xff\x78\x1d\x7d\xe1\x8f\x00\x00\x00") func confglueLuaBytes() ([]byte, error) { return bindataRead( @@ -101,7 +102,7 @@ func confglueLua() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "ConfGlue.lua", size: 117, mode: os.FileMode(420), modTime: time.Unix(1449150640, 0)} + info := bindataFileInfo{name: "ConfGlue.lua", size: 143, mode: os.FileMode(420), modTime: time.Unix(1455494274, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -286,7 +287,7 @@ func libsEscapistLua() (*asset, error) { return a, nil } -var _libsMsgpackLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x94\xcd\x8a\xdb\x30\x10\xc7\xcf\xeb\xa7\x18\xf6\x12\x19\x12\x17\xb6\x0b\xbb\x97\x5c\x7b\x6a\xa1\xd0\x96\x1e\xca\x12\x64\x5b\x76\x44\x65\x49\x48\xa3\xb6\x4b\xe9\xbb\x77\x64\xc9\x4e\xbc\x0e\xed\xe6\x90\x04\x8d\xe6\xe3\x3f\x3f\xcd\x64\xb7\x83\x0f\xc2\x7b\xde\x8b\x8f\xbc\xf9\x0e\x5f\x1d\xb7\x56\x38\x5f\x14\x74\xf1\xde\xf0\x16\xde\xba\xd6\x72\x87\xcf\xa0\x64\xed\xb8\x93\xc2\x17\xcb\x98\x4a\x05\x5e\x28\xd3\x70\x05\x83\xef\x6d\xcc\xb2\x07\xee\xbd\x70\xc8\x14\x65\xf0\xe8\xa4\xee\x59\xc3\x5d\x6d\x74\xd5\xab\x20\xd8\xed\x94\xf4\xcd\x8b\x3c\xb7\x65\x59\xb2\x72\x2c\xfe\x29\x58\x6b\x1c\xc2\x60\x9c\x00\xba\x02\x7c\xb6\xc2\x6f\xa1\x0e\x08\x1c\x01\x8f\x02\x1a\xe3\x11\x4c\x47\xbf\x83\xe5\x28\x6b\xa9\x24\xe9\xfc\x29\xf1\x08\xda\xe8\x5d\xaa\x38\x8b\xc2\x23\xc9\xf0\x55\xcc\xfd\x2e\xe8\x06\xa5\xd1\xbe\xc8\x97\x55\xfc\xa2\xb6\xbf\x6d\x0e\x5d\xbe\xdb\x3c\x51\x1b\xd3\x81\xd5\xa1\xeb\x84\xdb\x42\xa7\xcb\xe2\xc6\x09\x0c\x6e\x4e\x7c\x8a\x15\xbf\x70\xf3\x34\xbb\x3e\x6c\x27\x0a\x89\x40\xd5\x86\xc1\x32\x4a\x50\x96\x85\xd0\xed\xba\xf4\x2b\x2a\x27\xcc\xc1\xfe\xe0\xca\x93\x53\x2b\xea\xd0\x57\xbd\x40\xae\x54\x32\xb2\xd1\x4d\x76\x93\x0f\x61\xd2\xc5\x4d\x8e\xa3\x54\x14\xf4\xfb\x0f\x19\xfe\xd5\x77\x2c\x99\xeb\xad\xfd\x90\xd7\x4a\x4c\x3e\xa9\xc8\x45\xbf\x25\x8b\xc7\x2d\x8c\x81\x55\x63\x74\xc3\x31\xda\x89\xc2\x8d\x50\x5e\xbc\x42\xcc\xa9\xff\xc8\x2d\x7e\xe2\x23\x7e\x8e\x09\x2f\xbc\x60\x56\x78\x89\x21\xce\x08\x07\xa4\x7b\x02\x37\x10\xbb\x31\x80\x61\xe2\x36\xe0\x15\xcc\x16\x30\xf0\xff\xbc\x86\xcb\x3e\x4b\x56\xf7\x77\x57\xc2\x3a\x2b\x31\x77\x79\x0e\xea\x8b\x4e\xbe\xd0\x19\x07\xb5\xc1\xe3\xcc\xac\x0e\x52\xb5\x07\x2a\x7f\x06\x0b\x18\xf2\x7e\x0b\x2d\x61\x49\x44\xe8\x08\xfb\x3d\x3c\x8c\x5c\xe0\x6c\x7b\x48\x4c\xde\x84\xf5\xb6\x8f\xe1\x59\xf4\x29\xc7\xe3\x2a\x47\xda\xd6\x71\x8e\x02\x3d\xe6\x44\x3d\x32\x9f\x44\x86\x2c\x9f\x65\x49\xd9\xe5\x10\x47\x22\xea\x66\x0b\xdb\xbc\x1b\xc9\x9e\x36\xc4\x2f\x37\xe4\x7c\x70\x73\x07\x9d\x7e\xa9\xf5\xfe\x6e\x16\x3b\x4e\xda\x95\xda\x70\x2d\x6d\x38\xd9\x72\x55\xbf\x18\xc0\x3c\x1f\xf3\xd3\x2d\xff\x66\x8a\xbf\x01\x00\x00\xff\xff\x96\x2a\xdf\x87\xaa\x05\x00\x00") +var _libsMsgpackLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x94\x55\x4f\x6b\xdc\x3e\x10\x3d\xaf\x3f\xc5\xb0\x97\xd8\xb0\xab\x1f\x24\x81\x84\x40\x0e\xbf\x1e\x4a\x0f\x2d\x14\xda\xd2\x43\x09\x41\xb6\x65\xaf\x88\x2c\x19\x69\x94\x36\x94\x7e\xf7\x8e\x2c\xd9\xbb\x5e\x2f\x4d\xf6\x90\x04\xcf\x9f\x37\x6f\x9e\x66\x26\xdb\x2d\x7c\x12\xce\xf1\x56\x7c\xe6\xd5\x13\x7c\xb7\xbc\xef\x85\x75\x59\x46\x8e\x8f\x86\xd7\x70\x65\xeb\x9e\x5b\x7c\x01\x25\x4b\xcb\xad\x14\x2e\x9b\xe7\x30\xe5\x79\xa6\x4c\xc5\x15\x74\xae\xed\x03\xca\x3d\x70\xe7\x84\xc5\x5c\x11\x82\x43\x2b\x75\x9b\x57\xdc\x96\x46\xb3\x56\x79\x91\xaf\x47\xd0\xff\x8e\x70\xd6\x45\x51\xe4\xc5\x50\xfc\x8b\xef\x7b\x63\x11\x3a\x63\x05\x90\x0b\xf0\xa5\x17\x6e\x03\xa5\x47\xe0\x08\xb8\x13\x50\x19\x87\x60\x1a\xfa\xdb\xf5\x1c\x65\x29\x95\x24\x9e\x3f\x25\xee\x40\x1b\xbd\x8d\x15\x27\x52\xb8\x23\x1a\x8e\x05\xec\xf7\x5e\x57\x28\x8d\x76\x59\x72\xb2\xf0\x8b\xda\xfe\x71\xf1\xd8\x24\xdf\xc5\x03\xb5\x31\x7e\xe4\xa5\x6f\x1a\x61\x37\xd0\xe8\x22\x5b\x59\x81\xde\x4e\xc0\xfb\x5c\xf1\x0b\x2f\x1e\xa6\xd0\x9b\xcd\xa8\x42\x54\x80\xd5\xbe\xeb\x73\x02\x28\x8a\x4c\xe8\x7a\x59\xfa\x0d\x95\xa3\xcc\xbe\x7f\xe6\xca\x51\x50\x2d\x4a\xdf\xb2\x56\x20\x57\x2a\x1a\xf3\x21\x4c\x36\x63\x0c\xc9\xa4\xb3\x55\xca\x23\x28\x4a\xfa\xfd\x87\x0c\xff\xea\x3b\x94\x4c\xf5\x96\x71\xc8\x4b\x25\xc6\x98\x58\xe4\x64\xdc\x5c\x8b\xdb\x0d\x0c\x89\xac\x32\xba\xe2\x18\xec\xa4\xc2\x4a\x28\x27\xde\x40\x66\xdf\x7f\xd0\x2d\xfc\x84\x47\xfc\x1a\x00\x4f\xbc\x60\x62\x78\x4a\x43\x9c\x24\xec\x90\xfc\x24\x5c\x47\xda\x0d\x09\x39\x46\xdd\x3a\x3c\x43\xb3\x99\x18\xf8\xba\x5e\xdd\xe9\x98\xb9\x56\xd7\x97\x67\x8a\x75\x50\x62\xea\xf2\x50\xa8\x6f\x34\x84\x35\x75\xb9\x94\xca\x27\xcf\x69\xb5\x7c\x4d\x40\x94\xff\x21\xe4\xc0\xff\x50\xca\x16\x8c\x16\x54\xc0\x18\x36\x0a\x29\xeb\xde\x18\x45\xe9\x6b\xec\xfa\xbb\x54\xe1\xce\xd7\x5b\xfa\x5c\x67\xab\xa7\x67\x87\xb4\xc0\x4c\xea\x2a\x8f\xa1\xd3\x13\x68\xdf\xc9\x9a\x12\xc7\x10\x7a\x8d\xe3\x90\xc1\x1f\x6d\x8c\xad\xef\xd6\x8c\xa1\x49\xe7\x64\xc8\x2e\xf6\x05\xdc\x90\x9d\x48\xbf\xa6\xf0\x55\xe8\x61\x06\x54\xec\xd5\xd2\x31\x0b\x1a\x63\xa1\x34\xb8\x9b\x64\x2b\xbd\x54\xf5\x23\x41\x1d\x88\x05\x39\xf2\x76\x03\x41\xc4\x38\x3f\xf4\x09\xf7\xf7\x70\x33\x4c\x11\x1c\xdc\x1a\x7a\xba\x74\x37\x96\xb7\x71\x48\x4f\x4f\xbc\xc7\xb8\x5d\x60\xc4\xdb\x36\x6c\x9d\xa7\xd1\x1f\x67\x34\x4c\xe8\x48\xd2\x27\xfa\x79\xa2\x94\x42\x1e\xc3\x02\x05\xde\xf9\xcc\x36\x5d\x92\x68\x8f\xf7\xc4\xcd\xef\xc9\xe1\x9a\xa7\x0e\x1a\x7d\xcc\xf5\xfa\x72\x22\x3b\xec\xe5\x99\xdc\x70\x49\xad\xdb\xdb\x52\x55\x37\x5b\xd7\xb4\x4d\x47\x34\xae\x26\x1a\xe3\xd4\x33\x78\x47\x73\xbb\x0b\xf5\x27\xf8\x61\xae\x4e\x0c\x6c\x98\xb0\x61\x53\xc6\x40\xbf\x1c\xd0\x40\x68\xb4\xd4\x42\x25\x4b\xa2\xe8\xeb\x83\xd5\x9b\xff\x9b\xc8\xfe\x06\x00\x00\xff\xff\xa3\xda\xd8\x46\x6a\x07\x00\x00") func libsMsgpackLuaBytes() ([]byte, error) { return bindataRead( @@ -301,7 +302,7 @@ func libsMsgpackLua() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libs/msgpack.lua", size: 1450, mode: os.FileMode(420), modTime: time.Unix(1455472209, 0)} + info := bindataFileInfo{name: "libs/msgpack.lua", size: 1898, mode: os.FileMode(420), modTime: time.Unix(1455494649, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -386,7 +387,7 @@ func libsTemplateLua() (*asset, error) { return a, nil } -var _libsThreadLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xa4\x56\xcd\x8e\xa3\x38\x10\x3e\xc3\x53\x58\x5c\x16\x24\x82\xb4\x0f\x90\xc3\x48\xbb\xea\x39\xcf\xce\x2d\x6a\x45\x0e\x98\x0e\x0a\xd8\xac\x6d\x12\xb5\x5a\xd9\x67\xdf\xfa\xb1\x81\x64\x32\x3d\xdd\xbb\x2d\x75\x82\xed\xaa\xaf\xaa\xbe\xfa\x5c\x64\xb3\x11\xdf\x8f\x56\xc9\xc6\xa5\xf0\xf8\x55\x3a\x21\xc5\x61\xf2\xbe\x37\xb2\x11\xa6\x15\x9d\x73\x93\x72\xa5\x18\x8c\xf3\xfd\xab\x38\x74\xba\xe9\xf4\x8b\xab\xc4\x93\xf1\x5e\x8a\xde\xe0\xdf\x59\x89\x83\x35\x27\xa5\x85\x3b\x76\xbe\x4a\xd3\xde\xd4\xb2\x17\x83\x7b\x19\x65\x7d\x12\x5b\x61\xd5\xdf\x53\x67\x55\x9e\x85\xad\xac\x48\xd3\x76\xd2\xb5\xef\x8c\x16\x9e\xe2\x57\x6e\x94\x17\x9d\xd7\xa6\x51\xe5\x1c\x06\x9e\xa6\xb6\x55\xb6\x14\x8d\xd1\x7e\x72\x2a\xf8\x17\x69\xc2\x21\x5a\x9d\x26\x5d\x2b\xfc\xeb\xa8\xc8\xb5\x10\xdb\xad\xc8\x22\x74\x06\xd8\x0a\x2c\x92\x56\x43\x12\x78\x9e\x26\xaa\x77\xea\x47\x0f\xe7\x2d\xc4\x5b\xd9\x97\x42\x59\x0b\x4e\xc8\x03\x1f\xb2\x35\x1c\x82\x37\x9e\x05\xd3\x04\x9e\x8d\xcd\xe1\x13\xcf\x94\x6e\x52\xfe\xe0\xfc\x38\x7d\xc0\xf1\x46\x4f\xc3\x41\xd9\x9c\x77\x0a\x61\xac\xd8\xfc\x9e\x52\xf6\xb7\xb5\x45\x60\x06\xa8\x8f\xf3\x23\x84\xe0\xe8\x94\x7b\xa4\x88\xf3\xf7\xf2\xd0\xab\x39\xfd\xa4\x3e\xc6\xfc\x03\xb9\x7b\x66\x97\x2b\xa9\x9a\x69\x18\xf3\x56\x17\xa5\xf0\x76\x7a\x40\x37\x55\x02\x3c\x7d\x0a\xaa\x95\xe0\x51\x8a\xb7\x5d\xe6\xb2\xe7\x6d\x76\xce\xae\x37\x70\xc8\x49\xa4\xee\x9f\xad\xd0\x5d\xff\x0e\x83\x89\x55\x7e\xb2\x9a\xaa\x0f\x89\x0c\x23\x35\xf1\x26\x6c\x68\x73\x8e\x7e\xc9\x66\xf3\xfd\xeb\xb7\x3f\xbf\xfc\x81\xcf\xef\x2a\x2f\x89\x84\x4a\xfb\xe2\xc0\x24\x9c\x54\x93\xc6\xaf\x9c\x51\xf6\x5f\xbe\x3d\xfd\x45\xb6\xab\xf5\x16\xb2\x5e\xdc\x91\x35\xf4\x47\x98\x5d\x16\x39\xcc\x9e\xd1\x02\x0a\xe5\xe3\x58\x63\xd2\x42\xc3\x4f\xa5\x38\x8b\x4e\x8b\x51\x76\xd6\x51\x07\xa1\x7d\x8d\xa1\xf3\x64\xff\xb4\x3b\x3d\x03\xdc\x99\x96\x4c\x43\xfc\xe2\x80\xdc\x00\xa2\x01\x63\x56\x2d\x21\x87\x2a\x42\x6a\xd1\x26\x0f\x5c\x16\xb3\x7c\x86\x91\x02\xee\xad\xbc\xc4\x8e\xc6\xca\xa9\xee\x37\x74\xdf\x65\xad\xce\x30\x0b\xb8\x01\xbc\x5e\xea\x82\xdd\xb8\x80\xa3\x6b\xf1\x99\x7e\x72\x70\x74\x05\x94\xb7\x35\xa5\xab\xb4\xae\x2b\xd5\x3f\x16\x1d\x8a\x20\x8a\x76\x81\x5c\xeb\xec\x3f\x29\x0c\x36\xf0\xff\x87\x91\x64\xc7\x9a\x9f\xf2\x42\xc0\x74\xd4\xc6\x8b\x8b\xb1\x27\x88\x59\x86\xc1\x28\x2e\x9d\x3f\x46\x5a\xf0\x4e\x3b\x33\x28\x7f\xc4\x45\xb5\xa9\xe2\x14\x00\x9c\xa5\x14\xae\xe4\x46\xbb\x1f\x18\x97\x49\x72\x39\x76\xbd\xa2\xda\x83\x64\xd8\xcb\xd9\x9a\x66\xdb\x50\x59\x55\xab\xee\xac\x72\x8e\x03\x3b\xbf\x94\x3a\xf8\xae\x6c\xda\x07\x33\x8f\x75\x56\x04\x49\x23\x01\xeb\xd1\x97\x60\x58\x07\xd4\x2d\x31\xcb\x3b\x51\x8d\x80\xdc\xe7\x00\x1d\x42\x12\x20\x7e\x14\xc5\xb5\x20\xdc\x38\x68\x3e\x00\x16\x46\x0c\xa4\x10\x7d\xa9\x95\x71\xe8\xc2\x4b\x25\x99\x5b\x18\xe3\x56\x55\x85\xa6\x33\x38\xf4\xe2\x1e\x16\x91\x5a\xd4\x7c\xb9\xba\x4f\x6f\xe0\x78\x25\x9d\x17\xac\x90\xf9\x95\x13\x23\x00\xdf\x9d\x02\xbe\x8b\x45\x4d\xa1\xc8\x3b\x9a\xd7\xcd\x81\xf0\xc5\x82\x18\xdc\x30\x83\x5d\x86\x19\xef\xa5\x7b\xd5\x35\xdd\x35\x5c\x96\xf3\x01\x6d\x2d\xaa\x59\x0a\x4b\xee\x0a\x8d\x98\xeb\xec\x90\x1b\x86\x0a\xbb\x84\x16\x9e\xe1\xe0\xfa\x58\xfe\xa7\xb3\xf3\x06\x64\x48\xe2\x6f\x8c\x72\xfa\x37\xbe\x00\x42\x81\xea\xe1\xb5\xb6\x92\x78\x7d\x94\xfa\xff\x6b\x3c\x48\x1a\xa3\x62\x0b\xae\xef\xc8\x7e\x82\x36\xd6\x43\x03\x66\x2c\xb1\x5b\xce\xcb\x9f\xdc\x88\xa8\x64\x70\x5f\x54\x0c\x6b\x40\xaa\xce\xb2\x87\x20\xf3\x6e\x42\x69\xec\xf0\x44\xcb\x41\x51\x4b\xa2\x15\x1b\xfc\x5a\xb0\x64\xbc\xe5\x79\x45\x33\x08\xdf\x20\x41\xbb\x8b\xf0\x3f\x0c\x74\x97\xd1\x23\xcc\xf0\xda\xf8\xf8\x9d\x62\x64\x80\x88\x68\x00\xff\xd3\xdb\x15\xb4\x35\x37\x16\xd3\x80\x77\x1a\x42\x84\xe1\x8b\x3b\xcb\xcf\x90\x18\x1d\xd5\x71\x1f\x78\x97\xa1\x2d\xfc\x54\x60\x90\x5d\x46\x30\xb0\xa6\xef\x90\x42\x98\x9f\xca\xdd\xcd\x38\x04\x8c\xbd\x84\xd3\x8a\x52\x5f\x7a\x17\xf3\xe4\x79\x31\x1b\xdc\x50\x13\x6c\xb8\x39\x68\x32\x77\xf6\xb6\x6e\xbe\x1b\xd1\x9a\x68\x4c\xff\x0d\x00\x00\xff\xff\xb9\x90\x89\x97\x36\x0b\x00\x00") +var _libsThreadLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xa4\x56\xcd\x8e\xa3\x38\x10\x3e\xc3\x53\x58\x5c\x16\x24\x82\x76\x1f\x20\x87\x91\x76\xd5\x73\x9e\x9d\x5b\xd4\x8a\x1c\x30\x1d\x14\xb0\x59\xdb\x24\x6a\xb5\xb2\xcf\xbe\xf5\x63\x03\x49\x67\x66\x7a\x76\x5a\xea\x04\xdb\x55\x5f\x55\x7d\xf5\xb9\xc8\x66\x23\xbe\x1e\xad\x92\x8d\x4b\xe1\xf1\xb3\x74\x42\x8a\xc3\xe4\x7d\x6f\x64\x23\x4c\x2b\x3a\xe7\x26\xe5\x4a\x31\x18\xe7\xfb\x57\x71\xe8\x74\xd3\xe9\x17\x57\x89\x27\xe3\xbd\x14\xbd\xc1\xbf\xb3\x12\x07\x6b\x4e\x4a\x0b\x77\xec\x7c\x95\xa6\xbd\xa9\x65\x2f\x06\xf7\x32\xca\xfa\x24\xb6\xc2\xaa\x7f\xa6\xce\xaa\x3c\x0b\x5b\x59\x91\xa6\xed\xa4\x6b\xdf\x19\x2d\x3c\xc5\xaf\xdc\x28\x2f\x3a\xaf\x4d\xa3\xca\x39\x0c\x3c\x4d\x6d\xab\x6c\x29\x1a\xa3\xfd\xe4\x54\xf0\x2f\xd2\x84\x43\xb4\x3a\x4d\xba\x56\xf8\xd7\x51\x91\x6b\x21\xb6\x5b\x91\x45\xe8\x0c\xb0\x15\x58\x24\xad\x86\x24\xf0\x3c\x4d\x54\xef\xd4\x7b\x0f\xe7\x2d\xc4\x5b\xd9\x97\x42\x59\x0b\x4e\xc8\x03\x1f\xb2\x35\x1c\x82\x37\x9e\x05\xd3\x04\x9e\x8d\xcd\xe1\xb3\x14\xbf\xe3\xb1\xd2\x4d\xca\x1f\x9c\x22\x57\x00\x50\xde\xe8\x69\x38\x28\x9b\xf3\x4e\x21\x8c\x15\x9b\x3f\x52\x2a\xe0\xb6\xbc\x88\xcd\x00\xf5\x71\x7e\x84\x28\x9c\x00\xa5\x1f\x59\xe2\x12\xbc\x3c\xf4\x6a\xae\x20\xa9\x8f\xb1\x84\xc0\xef\x9e\x09\xe6\x62\xaa\x66\x1a\xc6\xbc\xd5\x45\x29\xbc\x9d\x1e\x30\x4e\x95\x00\x55\x3f\x05\xd5\x4a\xf0\x28\xc5\xdb\x2e\x73\xd9\xf3\x36\x3b\x67\xd7\x1b\x38\xe4\x24\xb2\xf7\xef\x56\xe8\xae\x7f\x4f\xe2\x62\x68\x95\x9f\xac\xa6\xea\x43\x22\xc3\x48\x7d\xbc\x09\x1b\x3a\x9d\xa3\x5f\xb2\xd9\x7c\xfd\xfc\xe5\xaf\x4f\x7f\xe2\xf3\x77\xc5\x97\x44\x42\xa5\x7d\x71\x60\x12\x4e\xaa\x49\xe3\x57\xce\x28\xfb\x4f\x5f\x9e\xfe\x26\xdb\xd5\x7a\x0b\x59\x2f\xee\xc8\x1a\xfa\x23\xcc\x2e\x8b\x1c\x66\xcf\x68\x01\x85\xf2\x71\xac\x31\x69\xa1\xe1\xa7\x52\x9c\x45\xa7\xc5\x28\x3b\xeb\xa8\x83\xd0\xbe\xc6\xd0\x79\xb2\x7f\xda\x9d\x9e\x01\xee\x4c\x4b\xa6\x21\x7e\x71\x40\x6e\x00\xd1\x80\x31\xab\x96\x90\x43\x15\x21\xb5\x68\x93\x07\x2e\x8b\x59\x3e\xc3\x48\x01\xf7\x56\x5e\x62\x47\x63\xe5\x54\xf7\x1b\xba\xef\xb2\x56\x67\x98\x05\x5c\x02\x5e\x2f\x75\xc1\x6e\x5c\xc0\xd1\xb5\xf8\x99\x7e\x72\x70\x74\x05\x94\xb7\x35\xa5\xab\xb4\xae\x2b\xd5\x3f\x16\x1d\x8a\x20\x8a\x76\x81\x5c\xeb\xec\x7f\x29\x0c\x36\xf0\xff\xdd\x54\xb2\x63\xcd\x4f\x79\x21\x60\x40\x6a\xe3\xc5\xc5\xd8\x13\xc4\x2c\xc3\x6c\x14\x97\xce\x1f\x23\x2d\x78\xa7\x9d\x19\x94\x3f\xe2\xa2\xda\x54\x71\x0a\x00\xce\x52\x0a\x57\x72\xa3\xdd\x0f\x4c\xcc\x24\xb9\x1c\xbb\x5e\x51\xed\x41\x32\xec\xe5\x6c\x4d\xe3\x6d\xa8\xac\xaa\x55\x77\x56\x39\xc7\x81\x9d\x1f\x4a\x1d\x7c\x57\x36\xed\x83\xb1\xc7\x3a\x2b\x82\xa4\x91\x80\xf5\xf4\x4b\x30\xac\x03\xea\x96\x98\xe5\x9d\xa8\x46\x40\xee\x73\x80\x0e\x21\x09\x10\x3f\x8a\xe2\x5a\x10\x6e\x1c\x34\x1f\x00\x0b\x23\x06\x52\x88\xbe\xd4\xca\x38\x74\xe1\xbd\x92\xcc\x2d\x8c\x71\xab\xaa\x42\xd3\x19\x1c\x7a\x71\x0f\x8b\x48\x2d\x6a\xbe\x5c\xdd\xa7\x37\x70\xbc\x92\xce\x0b\x56\xc8\xfc\xd6\x89\x11\x80\xef\x4e\x01\xdf\xc5\xa2\xa6\x50\xe4\x1d\xcd\xeb\xe6\x40\xf8\x62\x41\x0c\x6e\x98\xc1\x2e\xc3\x8c\xf7\xd2\xbd\xea\x9a\xee\x1a\x2e\xcb\xf9\x80\xb6\x16\xd5\x2c\x85\x25\x77\x85\x46\xcc\x75\x76\xc8\x0d\x43\x85\x5d\x42\x0b\xcf\x70\x70\x7d\x2c\xff\xd3\xd9\x79\x03\x32\x24\xf1\x37\x46\x39\xfd\x1b\x5f\x00\xa1\x40\xf5\xf0\x5a\x5b\x49\xbc\x3e\x4a\xfd\xeb\x1a\x0f\x92\xc6\xa8\xd8\x82\xeb\x77\x64\x3f\x41\x1b\xeb\xa1\x01\x33\x96\xd8\x2d\xe7\xe5\x37\x6e\x44\x54\x32\xb8\x2f\x2a\x86\x35\x20\x55\x67\xd9\x43\x90\x79\x37\xa1\x34\x76\x78\xa2\xe5\xa0\xa8\x25\xd1\x8a\x0d\x7e\x2c\x58\x32\xde\xf2\xbc\xa2\x19\x84\x6f\x90\xa0\xdd\x45\xf8\x1f\x06\xba\xcb\xe8\x11\x66\x78\x6d\x7c\xfc\x4e\x31\x32\x40\x44\x34\x80\xff\xe6\xed\x0a\xda\x9a\x1b\x8b\x69\xc0\x3b\x0d\x21\xc2\xf0\xc5\x9d\xe5\x67\x48\x8c\x8e\xea\xb8\x0f\xbc\xcb\xd0\x16\x7e\x2a\x30\xc8\x2e\x23\x18\x58\xd3\x77\x48\x21\xcc\x4f\xe5\xee\x66\x1c\x02\xc6\x5e\xc2\x69\x45\xa9\x2f\xbd\x8b\x79\xf2\xbc\x98\x0d\x6e\xa8\x09\x36\xdc\x1c\x34\x99\x3b\x7b\x5b\x37\xdf\x8d\x68\x4d\x34\xa6\xff\x05\x00\x00\xff\xff\xb3\xb5\xf8\x4b\x39\x0b\x00\x00") func libsThreadLuaBytes() ([]byte, error) { return bindataRead( @@ -401,7 +402,7 @@ func libsThreadLua() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "libs/thread.lua", size: 2870, mode: os.FileMode(420), modTime: time.Unix(1455492529, 0)} + info := bindataFileInfo{name: "libs/thread.lua", size: 2873, mode: os.FileMode(420), modTime: time.Unix(1455492983, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -426,6 +427,26 @@ func libsWrappersGlobalwrappersLua() (*asset, error) { return a, nil } +var _libsWrappersInitLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd5\x55\xf0\xcc\xcb\x2c\x51\x70\xcf\x29\x4d\x55\x48\xcb\x2f\x52\x70\xce\xcf\x4b\xcb\x4c\x57\x08\x2e\x49\x2c\x49\xe5\xca\x2e\x2b\x2e\xc9\x2f\x4a\xd5\x2b\x4e\x2d\xd1\x50\x2a\xc9\x2d\xb0\xca\x2d\x4e\x2f\x48\x4c\xce\xb6\x2a\x4d\xd1\x05\x72\x95\x74\x14\x0c\x34\xb9\x00\x01\x00\x00\xff\xff\x57\x44\xf0\xbd\x43\x00\x00\x00") + +func libsWrappersInitLuaBytes() ([]byte, error) { + return bindataRead( + _libsWrappersInitLua, + "libs/wrappers/init.lua", + ) +} + +func libsWrappersInitLua() (*asset, error) { + bytes, err := libsWrappersInitLuaBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "libs/wrappers/init.lua", size: 67, mode: os.FileMode(420), modTime: time.Unix(1455494253, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _libsWrappersMwLua = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xdc\x56\x41\x6f\xe2\x3c\x10\x3d\x93\x5f\x61\xe5\x94\x48\xe0\xaf\xdf\xee\xad\x12\x87\x8a\xd2\x55\xa5\xb6\x54\x40\xb7\x87\xaa\x42\x26\x31\x25\x6a\xb0\x23\xdb\x40\xab\xaa\xfb\xdb\x77\x6c\xc7\x49\x80\xb8\xec\x76\xb5\x97\xbd\x98\xc4\x33\xf3\xe6\x79\xe6\x79\x42\xaf\x87\xae\xb3\x34\xcd\xe9\x96\x08\x8a\xee\x05\x29\x0a\x2a\x64\x10\x2c\xd6\x2c\x51\x19\x67\x68\xb5\xc5\x8c\x6e\xa3\x05\xeb\xa2\x79\xc6\xd2\x8c\x3d\xc9\x2e\xca\x98\x54\x84\x25\x14\x1e\xc1\x08\xcf\x8a\xc6\x41\x27\xe7\x09\xc9\x51\xc2\x53\x8a\xfa\x28\x0c\xdd\x46\xe5\x0c\xbb\xf5\x33\x17\xa8\xf7\x7f\xd0\xc9\x16\x48\xbd\x16\x14\xf0\x63\xd4\x87\x28\x97\x37\x44\x6a\x49\x59\xd0\xe9\x94\x70\x52\x09\x48\x8d\xd3\xf5\xaa\xd0\xbe\x41\x87\xe6\x92\xee\x07\x5b\xa7\x2a\x54\x73\xa6\x42\x40\x74\xce\x49\x6a\x8d\x91\xc6\x83\x70\x9d\x98\x71\x65\xec\xa5\xbb\x37\x95\xc9\xa5\x1d\xc0\x99\x8b\x08\x56\xb3\xc9\xd2\xc0\x2e\xf6\x98\xc2\x3d\x80\xdd\x9c\xcb\x55\xc6\xe1\x3b\xb6\xae\x8c\x96\xb3\x22\xf3\x9c\x56\x94\x3b\xc2\x51\x86\xba\x9f\x5f\x8d\x67\x37\x13\xc3\xb8\x8b\x94\x58\xd3\xba\x05\x4d\x56\xde\x90\x05\x01\x8f\x2e\x7a\x7b\x08\x65\xf8\xd8\x0f\x37\xe1\x7b\xcd\xdb\xc6\x7e\x8a\xd2\xf8\xce\x25\x68\xc8\xe0\xd7\xe9\xb5\x86\x7f\x44\x55\x2f\x40\x54\x83\xfc\xe8\x23\x96\xe5\x8e\x59\xb3\x1d\xc6\x4b\x50\xb5\x16\x0c\x3a\xa1\xdf\x76\x24\xbc\x95\x3e\x05\xb7\xe9\xf6\x1f\x16\xe5\xd1\x76\x83\x4f\x7d\x49\x3d\x12\xb8\x9f\xfc\xa1\x08\x00\xe0\x23\x61\xef\x2a\xf4\xd3\x74\x3c\xa2\x3a\x4e\xe9\x6f\xab\x91\x26\x4b\x5e\xa6\x12\x54\x16\x95\x04\xf5\x0b\x10\x52\x9c\xad\x57\x73\x2a\x22\x63\xd4\x93\xf2\xcb\xc9\x49\xdd\x3d\x23\x96\x36\x69\x95\x09\x21\xc1\x50\x27\xd0\xd1\x5d\x54\x4a\xab\xa9\xcc\x1a\x60\xb7\xf5\xde\xf8\x53\x01\x47\x00\x3e\x71\x5c\xf5\xa5\xf6\xd5\x87\x99\xd2\x17\x55\xfa\x2b\xde\xd4\x74\x59\x8b\xd6\x0a\x98\x20\x05\x4b\x55\x85\x5d\x02\xc6\x1e\xb5\x16\x23\x86\x3c\x60\x8d\x0f\x81\xe5\x2b\x53\xe4\x65\x99\xfb\x80\x4d\xe9\xbd\xa0\x3b\xd1\x71\x1b\x3c\x0c\xf4\x2c\x89\x0a\xa2\x96\x5d\x54\x08\xba\xc8\x5e\xaa\xee\xe9\x4d\xe8\x9e\xf9\x01\xc4\xfa\x03\x68\xfd\xb4\xc9\x3e\x94\xc6\x92\x54\x42\xc4\x9c\x33\x3c\xb3\xd0\x92\x8a\x0d\xdd\xc3\x3f\x60\x31\xf8\x76\x59\xba\x10\xa1\x87\x19\x65\x1b\x68\xd4\x36\x8d\x6b\x91\x68\x73\xab\x48\x76\xb8\x72\x89\xc9\x5c\xea\x17\x1b\x50\xd9\x01\x0c\xcc\x7a\x2d\xc9\x96\xfb\x3a\x1f\x18\xcc\x0f\x58\xde\xde\x83\xca\x04\x24\xc0\xa2\x57\x6b\xd0\x17\x66\xf3\x10\x4e\x86\xe3\xef\xc3\xf1\x6c\x32\xba\x98\xde\x9f\x8d\x87\xe1\xa3\x9e\xb1\x03\x73\xe6\x10\xc1\xbf\x8f\x5b\xc1\xd7\x29\xa3\x52\x22\xb2\xa4\x24\xc5\xe8\xf4\xab\x0b\x3d\x1f\x0d\xee\xae\x87\x37\xd3\xd9\x78\x34\x9a\x9a\xc0\x0d\x11\x58\x70\xae\x2a\xf0\xc1\xf8\xf2\x76\x3a\xbb\xb8\xbc\x1a\xde\x9c\x5d\x5b\x70\xef\x99\xa0\x9c\x05\xfc\xc9\x49\x2d\x51\xc3\x70\x01\x54\x9f\xbb\x68\x03\x53\x03\x4a\x92\x09\x19\x81\x31\x46\x29\xd7\x03\xc2\x5c\x0e\x0c\xf3\x84\x0a\x15\x35\x82\x1b\x1a\x7f\x8e\x31\x0e\xfb\x21\xc6\xd5\xce\x26\x76\xa3\xa2\xbe\x24\xae\xc3\xab\xed\xac\xee\x1c\xd4\xd6\xb5\xaf\x81\x5d\x5f\x30\x3b\x4e\x42\xd3\x28\xfd\x4d\x28\x3f\x00\xa1\xef\x46\x01\xf2\xec\xfc\x95\x91\x55\x25\xcf\x03\x6d\x1c\xca\x94\xb0\xf4\xa0\x5e\xbb\xda\x3d\x10\x82\x5f\x07\x1e\x19\x1c\x53\xc1\x7f\x4f\x99\xf2\x2b\xe1\xa8\x10\x7a\xbd\xdf\x50\x82\x4f\x08\x1f\xe9\xe0\xf3\x32\xb0\x2a\x68\x15\xc1\x5e\xab\x7c\x62\x38\xe8\x72\xc2\x57\xf0\xa5\xa4\x11\xc6\x38\xde\xeb\xc5\x1b\xec\xbd\xb7\xa5\x73\x31\xda\xcf\x42\xfe\x0c\x00\x00\xff\xff\x49\x71\x36\x71\xf5\x0b\x00\x00") func libsWrappersMwLuaBytes() ([]byte, error) { @@ -535,6 +556,7 @@ var _bindata = map[string]func() (*asset, error){ "libs/template.lua": libsTemplateLua, "libs/thread.lua": libsThreadLua, "libs/wrappers/globalwrappers.lua": libsWrappersGlobalwrappersLua, + "libs/wrappers/init.lua": libsWrappersInitLua, "libs/wrappers/mw.lua": libsWrappersMwLua, "libs/wrappers/srv.lua": libsWrappersSrvLua, } @@ -601,6 +623,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ "thread.lua": &bintree{libsThreadLua, map[string]*bintree{}}, "wrappers": &bintree{nil, map[string]*bintree{ "globalwrappers.lua": &bintree{libsWrappersGlobalwrappersLua, map[string]*bintree{}}, + "init.lua": &bintree{libsWrappersInitLua, map[string]*bintree{}}, "mw.lua": &bintree{libsWrappersMwLua, map[string]*bintree{}}, "srv.lua": &bintree{libsWrappersSrvLua, map[string]*bintree{}}, }}, diff --git a/tests/thread.lua b/tests/thread.lua new file mode 100644 index 0000000..e4482b5 --- /dev/null +++ b/tests/thread.lua @@ -0,0 +1,6 @@ +thread = require("thread") +local a = "test" +thread.spawn(function() + print(a) +end) +os.sleep(10)