diff options
Diffstat (limited to 'vendor/github.com/bytedance/sonic/internal/decoder/api')
3 files changed, 13 insertions, 15 deletions
diff --git a/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_amd64.go b/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_amd64.go index 551b35b1b..4e7f46fa6 100644 --- a/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_amd64.go +++ b/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_amd64.go @@ -1,5 +1,5 @@ -//go:build go1.17 && !go1.25 -// +build go1.17,!go1.25 +//go:build go1.17 && !go1.26 +// +build go1.17,!go1.26 /* * Copyright 2021 ByteDance Inc. diff --git a/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_arm64.go b/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_arm64.go index a56e1579d..5a7d44de1 100644 --- a/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_arm64.go +++ b/vendor/github.com/bytedance/sonic/internal/decoder/api/decoder_arm64.go @@ -1,4 +1,4 @@ -// +build go1.17,!go1.25 +// +build go1.17,!go1.26 /* * Copyright 2021 ByteDance Inc. diff --git a/vendor/github.com/bytedance/sonic/internal/decoder/api/stream.go b/vendor/github.com/bytedance/sonic/internal/decoder/api/stream.go index ecf120462..d0ee97511 100644 --- a/vendor/github.com/bytedance/sonic/internal/decoder/api/stream.go +++ b/vendor/github.com/bytedance/sonic/internal/decoder/api/stream.go @@ -17,14 +17,15 @@ package api import ( - `bytes` - `io` - `sync` - - `github.com/bytedance/sonic/internal/native` - `github.com/bytedance/sonic/internal/native/types` - `github.com/bytedance/sonic/internal/rt` - `github.com/bytedance/sonic/option` + "bytes" + "io" + "sync" + + "github.com/bytedance/sonic/internal/native" + "github.com/bytedance/sonic/internal/native/types" + "github.com/bytedance/sonic/internal/rt" + "github.com/bytedance/sonic/internal/utils" + "github.com/bytedance/sonic/option" ) var ( @@ -194,7 +195,7 @@ func (self *StreamDecoder) peek() (byte, error) { func (self *StreamDecoder) scan() (byte, bool) { for i := self.scanp; i < len(self.buf); i++ { c := self.buf[i] - if isSpace(c) { + if utils.IsSpace(c) { continue } self.scanp = i @@ -203,9 +204,6 @@ func (self *StreamDecoder) scan() (byte, bool) { return 0, true } -func isSpace(c byte) bool { - return types.SPACE_MASK & (1 << c) != 0 -} func (self *StreamDecoder) refill() error { // Make room to read more into the buffer. |
