mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	The binary layout of cfgdata has changed, so the magic number has to
change as well. Add a comment explaining this.
This commit is contained in:
		
							parent
							
								
									5ef601854e
								
							
						
					
					
						commit
						b8f134e3c3
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -253,8 +253,14 @@ class bdist_wininst (Command):
 | 
				
			||||||
            # empty pre-install script
 | 
					            # empty pre-install script
 | 
				
			||||||
            cfgdata = cfgdata + "\0"
 | 
					            cfgdata = cfgdata + "\0"
 | 
				
			||||||
        file.write(cfgdata)
 | 
					        file.write(cfgdata)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # The 'magic number' 0x1234567B is used to make sure that the
 | 
				
			||||||
 | 
					        # binary layout of 'cfgdata' is what the wininst.exe binary
 | 
				
			||||||
 | 
					        # expects.  If the layout changes, increment that number, make
 | 
				
			||||||
 | 
					        # the corresponding changes to the wininst.exe sources, and
 | 
				
			||||||
 | 
					        # recompile them.
 | 
				
			||||||
        header = struct.pack("<iii",
 | 
					        header = struct.pack("<iii",
 | 
				
			||||||
                             0x1234567A,       # tag
 | 
					                             0x1234567B,       # tag
 | 
				
			||||||
                             len(cfgdata),     # length
 | 
					                             len(cfgdata),     # length
 | 
				
			||||||
                             bitmaplen,        # number of bytes in bitmap
 | 
					                             bitmaplen,        # number of bytes in bitmap
 | 
				
			||||||
                             )
 | 
					                             )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue