summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/ast/api_amd64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bytedance/sonic/ast/api_amd64.go')
-rw-r--r--vendor/github.com/bytedance/sonic/ast/api_amd64.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/vendor/github.com/bytedance/sonic/ast/api_amd64.go b/vendor/github.com/bytedance/sonic/ast/api_amd64.go
index 3047f59c3..da6738efd 100644
--- a/vendor/github.com/bytedance/sonic/ast/api_amd64.go
+++ b/vendor/github.com/bytedance/sonic/ast/api_amd64.go
@@ -1,4 +1,4 @@
-// +build amd64,go1.15,!go1.21
+// +build amd64,go1.16,!go1.22
/*
* Copyright 2022 ByteDance Inc.
@@ -87,7 +87,13 @@ func encodeBase64(src []byte) string {
func (self *Parser) decodeValue() (val types.JsonState) {
sv := (*rt.GoString)(unsafe.Pointer(&self.s))
- self.p = native.Value(sv.Ptr, sv.Len, self.p, &val, 0)
+ flag := types.F_USE_NUMBER
+ if self.dbuf != nil {
+ flag = 0
+ val.Dbuf = self.dbuf
+ val.Dcap = types.MaxDigitNums
+ }
+ self.p = native.Value(sv.Ptr, sv.Len, self.p, &val, uint64(flag))
return
}
@@ -148,4 +154,4 @@ func (self *Searcher) GetByPath(path ...interface{}) (Node, error) {
return Node{}, self.parser.ExportError(err)
}
return newRawNode(self.parser.s[start:self.parser.p], t), nil
-} \ No newline at end of file
+}