mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-26 11:46:34 +01:00
Forgot to support map16 / map32
This commit is contained in:
parent
8325cce44c
commit
d4d7495c0a
14
go/unpack.go
14
go/unpack.go
@ -197,6 +197,20 @@ func Unpack(reader io.Reader) (v reflect.Value, n int, err os.Error) {
|
|||||||
retval, n, e = unpackArray(reader, uint(nelemstoread))
|
retval, n, e = unpackArray(reader, uint(nelemstoread))
|
||||||
nbytesread += n
|
nbytesread += n
|
||||||
if e != nil { return nil, nbytesread, e }
|
if e != nil { return nil, nbytesread, e }
|
||||||
|
case 0xde:
|
||||||
|
nelemstoread, n, e := readUint16(reader)
|
||||||
|
nbytesread += n
|
||||||
|
if e != nil { return nil, nbytesread, e }
|
||||||
|
retval, n, e = unpackMap(reader, uint(nelemstoread))
|
||||||
|
nbytesread += n
|
||||||
|
if e != nil { return nil, nbytesread, e }
|
||||||
|
case 0xdf:
|
||||||
|
nelemstoread, n, e := readUint32(reader)
|
||||||
|
nbytesread += n
|
||||||
|
if e != nil { return nil, nbytesread, e }
|
||||||
|
retval, n, e = unpackMap(reader, uint(nelemstoread))
|
||||||
|
nbytesread += n
|
||||||
|
if e != nil { return nil, nbytesread, e }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retval, nbytesread, nil
|
return retval, nbytesread, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user