mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Finally rid of capital Sirupsen??
This commit is contained in:
17
vendor/github.com/ugorji/go/codec/msgpack.go
generated
vendored
17
vendor/github.com/ugorji/go/codec/msgpack.go
generated
vendored
@@ -349,11 +349,11 @@ func (d *msgpackDecDriver) DecodeNaked() {
|
||||
n.s = d.DecodeString()
|
||||
} else {
|
||||
n.v = valueTypeBytes
|
||||
n.l = d.DecodeBytes(nil, false, false)
|
||||
n.l = d.DecodeBytes(nil, false)
|
||||
}
|
||||
case bd == mpBin8, bd == mpBin16, bd == mpBin32:
|
||||
n.v = valueTypeBytes
|
||||
n.l = d.DecodeBytes(nil, false, false)
|
||||
n.l = d.DecodeBytes(nil, false)
|
||||
case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax:
|
||||
n.v = valueTypeArray
|
||||
decodeFurther = true
|
||||
@@ -525,12 +525,11 @@ func (d *msgpackDecDriver) DecodeBool() (b bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
|
||||
func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
|
||||
if !d.bdRead {
|
||||
d.readNextBd()
|
||||
}
|
||||
var clen int
|
||||
// ignore isstring. Expect that the bytes may be found from msgpackContainerStr or msgpackContainerBin
|
||||
if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 {
|
||||
clen = d.readContainerLen(msgpackContainerBin)
|
||||
} else {
|
||||
@@ -553,7 +552,11 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOu
|
||||
}
|
||||
|
||||
func (d *msgpackDecDriver) DecodeString() (s string) {
|
||||
return string(d.DecodeBytes(d.b[:], true, true))
|
||||
return string(d.DecodeBytes(d.b[:], true))
|
||||
}
|
||||
|
||||
func (d *msgpackDecDriver) DecodeStringAsBytes() (s []byte) {
|
||||
return d.DecodeBytes(d.b[:], true)
|
||||
}
|
||||
|
||||
func (d *msgpackDecDriver) readNextBd() {
|
||||
@@ -687,10 +690,10 @@ func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs
|
||||
}
|
||||
xbd := d.bd
|
||||
if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 {
|
||||
xbs = d.DecodeBytes(nil, false, true)
|
||||
xbs = d.DecodeBytes(nil, true)
|
||||
} else if xbd == mpStr8 || xbd == mpStr16 || xbd == mpStr32 ||
|
||||
(xbd >= mpFixStrMin && xbd <= mpFixStrMax) {
|
||||
xbs = d.DecodeBytes(nil, true, true)
|
||||
xbs = d.DecodeStringAsBytes()
|
||||
} else {
|
||||
clen := d.readExtLen()
|
||||
xtag = d.r.readn1()
|
||||
|
||||
Reference in New Issue
Block a user