Commit 1b9d2b4e authored by François Perrad's avatar François Perrad
Browse files

unpackers becomes private

parent 54de47e4
Revision history for lua-MessagePack
0.5.0
0.4.0 Thu Dec 8 10:30:00 2016
refactor without types_map indirection
remove set_number'integer'
......
......@@ -748,7 +748,7 @@ local function unpack_ext (c, n, tag)
return m.build_ext(tag, s:sub(i, e))
end
unpackers = {
unpackers = setmetatable({
[0xC0] = function () return nil end,
[0xC2] = function () return false end,
[0xC3] = function () return true end,
......@@ -780,8 +780,7 @@ unpackers = {
[0xDD] = function (c) return unpack_array(c, unpack_uint32(c)) end,
[0xDE] = function (c) return unpack_map(c, unpack_uint16(c)) end,
[0xDF] = function (c) return unpack_map(c, unpack_uint32(c)) end,
}
m.unpackers = setmetatable(unpackers, {
}, {
__index = function (t, k)
if k < 0xC0 then
if k < 0x80 then
......
......@@ -499,7 +499,7 @@ local function unpack_ext (c, n, tag)
return m.build_ext(tag, s:sub(i, e))
end
unpackers = {
unpackers = setmetatable({
[0xC0] = function () return nil end,
[0xC2] = function () return false end,
[0xC3] = function () return true end,
......@@ -531,8 +531,7 @@ unpackers = {
[0xDD] = function (c) return unpack_array(c, unpack_uint32(c)) end,
[0xDE] = function (c) return unpack_map(c, unpack_uint16(c)) end,
[0xDF] = function (c) return unpack_map(c, unpack_uint32(c)) end,
}
m.unpackers = setmetatable(unpackers, {
}, {
__index = function (t, k)
if k < 0xC0 then
if k < 0x80 then
......
......@@ -2,7 +2,7 @@
require 'Test.More'
plan(8)
plan(7)
if not require_ok 'MessagePack' then
BAIL_OUT "no lib"
......@@ -15,7 +15,6 @@ like( m._DESCRIPTION, 'MessagePack', "_DESCRIPTION" )
like( m._VERSION, '^%d%.%d%.%d$', "_VERSION" )
type_ok( m.packers, 'table', "table packers" )
type_ok( m.unpackers, 'table', "table unpackers" )
type_ok( m.build_ext, 'function', "function build_ext" )
if m.full64bits then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment