mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:02:25 -05:00 
			
		
		
		
	[chore]: Bump github.com/gin-contrib/cors from 1.5.0 to 1.7.0 (#2745)
This commit is contained in:
		
					parent
					
						
							
								4c155aa847
							
						
					
				
			
			
				commit
				
					
						e24efcac8b
					
				
			
		
					 158 changed files with 11727 additions and 4290 deletions
				
			
		
							
								
								
									
										34
									
								
								vendor/github.com/bytedance/sonic/loader/stubs.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								vendor/github.com/bytedance/sonic/loader/stubs.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -17,7 +17,8 @@ | |||
| package loader | ||||
| 
 | ||||
| import ( | ||||
|     `sync` | ||||
|     "sync/atomic" | ||||
|     "unsafe" | ||||
|     _ `unsafe` | ||||
| ) | ||||
| 
 | ||||
|  | @ -25,16 +26,35 @@ import ( | |||
| //goland:noinspection GoUnusedGlobalVariable | ||||
| var lastmoduledatap *moduledata | ||||
| 
 | ||||
| var moduledataMux sync.Mutex | ||||
| 
 | ||||
| func registerModule(mod *moduledata) { | ||||
|     moduledataMux.Lock() | ||||
|     lastmoduledatap.next = mod | ||||
|     lastmoduledatap = mod | ||||
|     moduledataMux.Unlock() | ||||
|     registerModuleLockFree(&lastmoduledatap, mod) | ||||
| } | ||||
| 
 | ||||
| //go:linkname moduledataverify1 runtime.moduledataverify1 | ||||
| func moduledataverify1(_ *moduledata) | ||||
| 
 | ||||
| func registerModuleLockFree(tail **moduledata, mod *moduledata) { | ||||
|     for { | ||||
|         oldTail := loadModule(tail) | ||||
|         if casModule(tail, oldTail, mod) { | ||||
|             storeModule(&oldTail.next, mod) | ||||
|             break | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| func loadModule(p **moduledata) *moduledata { | ||||
|     return (*moduledata)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) | ||||
| } | ||||
| 
 | ||||
| func storeModule(p **moduledata, value *moduledata) { | ||||
|     atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(value)) | ||||
| } | ||||
| 
 | ||||
| func casModule(p **moduledata, oldValue *moduledata, newValue *moduledata) bool { | ||||
|     return atomic.CompareAndSwapPointer( | ||||
|         (*unsafe.Pointer)(unsafe.Pointer(p)), | ||||
|         unsafe.Pointer(oldValue), | ||||
|         unsafe.Pointer(newValue), | ||||
|     ) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue