增加websocket支持
This commit is contained in:
46
vendor/github.com/bytedance/sonic/sonic.go
generated
vendored
46
vendor/github.com/bytedance/sonic/sonic.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// +build amd64,go1.16,!go1.23
|
||||
// +build amd64,go1.15,!go1.21
|
||||
|
||||
/*
|
||||
* Copyright 2021 ByteDance Inc.
|
||||
@@ -58,12 +58,6 @@ func (cfg Config) Froze() API {
|
||||
if cfg.ValidateString {
|
||||
api.encoderOpts |= encoder.ValidateString
|
||||
}
|
||||
if cfg.NoValidateJSONMarshaler {
|
||||
api.encoderOpts |= encoder.NoValidateJSONMarshaler
|
||||
}
|
||||
if cfg.NoEncoderNewline {
|
||||
api.encoderOpts |= encoder.NoEncoderNewline
|
||||
}
|
||||
|
||||
// configure decoder options:
|
||||
if cfg.UseInt64 {
|
||||
@@ -145,23 +139,23 @@ func (cfg frozenConfig) Valid(data []byte) bool {
|
||||
// Opts are the compile options, for example, "option.WithCompileRecursiveDepth" is
|
||||
// a compile option to set the depth of recursive compile for the nested struct type.
|
||||
func Pretouch(vt reflect.Type, opts ...option.CompileOption) error {
|
||||
if err := encoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := decoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
// to pretouch the corresponding pointer type as well
|
||||
if vt.Kind() == reflect.Ptr {
|
||||
vt = vt.Elem()
|
||||
} else {
|
||||
vt = reflect.PtrTo(vt)
|
||||
}
|
||||
if err := encoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := decoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
if err := encoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := decoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
// to pretouch the corresponding pointer type as well
|
||||
if vt.Kind() == reflect.Ptr {
|
||||
vt = vt.Elem()
|
||||
} else {
|
||||
vt = reflect.PtrTo(vt)
|
||||
}
|
||||
if err := encoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := decoder.Pretouch(vt, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user