mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	[3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)
gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214)
(cherry picked from commit f6da790122)
Co-authored-by: Victor Stinner <vstinner@python.org>
			
			
This commit is contained in:
		
							parent
							
								
									6be55f1bed
								
							
						
					
					
						commit
						1177897551
					
				
					 7 changed files with 16 additions and 7 deletions
				
			
		|  | @ -1496,7 +1496,7 @@ address_to_hash(void *ptr) { | |||
|     uintptr_t addr = (uintptr_t)ptr; | ||||
|     for (int i = 0; i < SIZEOF_VOID_P; i++) { | ||||
|         uhash ^= addr & 255; | ||||
|         uhash *= (uint64_t)_PyHASH_MULTIPLIER; | ||||
|         uhash *= (uint64_t)PyHASH_MULTIPLIER; | ||||
|         addr >>= 8; | ||||
|     } | ||||
|     return uhash; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)