mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 09:42:26 -05:00 
			
		
		
		
	[chore]: Bump github.com/gin-contrib/gzip from 1.0.1 to 1.1.0 (#3639)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/gin-contrib/gzip/releases) - [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml) - [Commits](https://github.com/gin-contrib/gzip/compare/v1.0.1...v1.1.0) --- updated-dependencies: - dependency-name: github.com/gin-contrib/gzip dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								8cfae010a9
							
						
					
				
			
			
				commit
				
					
						4d423102c1
					
				
			
		
					 519 changed files with 156968 additions and 132058 deletions
				
			
		
							
								
								
									
										80
									
								
								vendor/google.golang.org/protobuf/internal/impl/encode.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										80
									
								
								vendor/google.golang.org/protobuf/internal/impl/encode.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -10,7 +10,8 @@ import ( | |||
| 	"sync/atomic" | ||||
| 
 | ||||
| 	"google.golang.org/protobuf/internal/flags" | ||||
| 	proto "google.golang.org/protobuf/proto" | ||||
| 	"google.golang.org/protobuf/internal/protolazy" | ||||
| 	"google.golang.org/protobuf/proto" | ||||
| 	piface "google.golang.org/protobuf/runtime/protoiface" | ||||
| ) | ||||
| 
 | ||||
|  | @ -71,11 +72,39 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int | |||
| 		e := p.Apply(mi.extensionOffset).Extensions() | ||||
| 		size += mi.sizeExtensions(e, opts) | ||||
| 	} | ||||
| 
 | ||||
| 	var lazy **protolazy.XXX_lazyUnmarshalInfo | ||||
| 	var presence presence | ||||
| 	if mi.presenceOffset.IsValid() { | ||||
| 		presence = p.Apply(mi.presenceOffset).PresenceInfo() | ||||
| 		if mi.lazyOffset.IsValid() { | ||||
| 			lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	for _, f := range mi.orderedCoderFields { | ||||
| 		if f.funcs.size == nil { | ||||
| 			continue | ||||
| 		} | ||||
| 		fptr := p.Apply(f.offset) | ||||
| 
 | ||||
| 		if f.presenceIndex != noPresence { | ||||
| 			if !presence.Present(f.presenceIndex) { | ||||
| 				continue | ||||
| 			} | ||||
| 
 | ||||
| 			if f.isLazy && fptr.AtomicGetPointer().IsNil() { | ||||
| 				if lazyFields(opts) { | ||||
| 					size += (*lazy).SizeField(uint32(f.num)) | ||||
| 					continue | ||||
| 				} else { | ||||
| 					mi.lazyUnmarshal(p, f.num) | ||||
| 				} | ||||
| 			} | ||||
| 			size += f.funcs.size(fptr, f, opts) | ||||
| 			continue | ||||
| 		} | ||||
| 
 | ||||
| 		if f.isPointer && fptr.Elem().IsNil() { | ||||
| 			continue | ||||
| 		} | ||||
|  | @ -134,11 +163,52 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt | |||
| 			return b, err | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	var lazy **protolazy.XXX_lazyUnmarshalInfo | ||||
| 	var presence presence | ||||
| 	if mi.presenceOffset.IsValid() { | ||||
| 		presence = p.Apply(mi.presenceOffset).PresenceInfo() | ||||
| 		if mi.lazyOffset.IsValid() { | ||||
| 			lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	for _, f := range mi.orderedCoderFields { | ||||
| 		if f.funcs.marshal == nil { | ||||
| 			continue | ||||
| 		} | ||||
| 		fptr := p.Apply(f.offset) | ||||
| 
 | ||||
| 		if f.presenceIndex != noPresence { | ||||
| 			if !presence.Present(f.presenceIndex) { | ||||
| 				continue | ||||
| 			} | ||||
| 			if f.isLazy { | ||||
| 				// Be careful, this field needs to be read atomically, like for a get | ||||
| 				if f.isPointer && fptr.AtomicGetPointer().IsNil() { | ||||
| 					if lazyFields(opts) { | ||||
| 						b, _ = (*lazy).AppendField(b, uint32(f.num)) | ||||
| 						continue | ||||
| 					} else { | ||||
| 						mi.lazyUnmarshal(p, f.num) | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				b, err = f.funcs.marshal(b, fptr, f, opts) | ||||
| 				if err != nil { | ||||
| 					return b, err | ||||
| 				} | ||||
| 				continue | ||||
| 			} else if f.isPointer && fptr.Elem().IsNil() { | ||||
| 				continue | ||||
| 			} | ||||
| 			b, err = f.funcs.marshal(b, fptr, f, opts) | ||||
| 			if err != nil { | ||||
| 				return b, err | ||||
| 			} | ||||
| 			continue | ||||
| 		} | ||||
| 
 | ||||
| 		if f.isPointer && fptr.Elem().IsNil() { | ||||
| 			continue | ||||
| 		} | ||||
|  | @ -163,6 +233,14 @@ func fullyLazyExtensions(opts marshalOptions) bool { | |||
| 	return opts.flags&piface.MarshalDeterministic == 0 | ||||
| } | ||||
| 
 | ||||
| // lazyFields returns true if we should attempt to keep fields lazy over size and marshal. | ||||
| func lazyFields(opts marshalOptions) bool { | ||||
| 	// When deterministic marshaling is requested, force an unmarshal for lazy | ||||
| 	// fields to produce a deterministic result, instead of passing through | ||||
| 	// bytes lazily that may or may not match what Go Protobuf would produce. | ||||
| 	return opts.flags&piface.MarshalDeterministic == 0 | ||||
| } | ||||
| 
 | ||||
| func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { | ||||
| 	if ext == nil { | ||||
| 		return 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue