Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8f134e

Browse files
author
Thomas Heller
committed
The binary layout of cfgdata has changed, so the magic number has to
change as well. Add a comment explaining this.
1 parent 5ef6018 commit b8f134e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Lib/distutils/command/bdist_wininst.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,14 @@ def create_exe (self, arcname, fullname, bitmap=None):
253253
# empty pre-install script
254254
cfgdata = cfgdata + "\0"
255255
file.write(cfgdata)
256+
257+
# The 'magic number' 0x1234567B is used to make sure that the
258+
# binary layout of 'cfgdata' is what the wininst.exe binary
259+
# expects. If the layout changes, increment that number, make
260+
# the corresponding changes to the wininst.exe sources, and
261+
# recompile them.
256262
header = struct.pack("<iii",
257-
0x1234567A, # tag
263+
0x1234567B, # tag
258264
len(cfgdata), # length
259265
bitmaplen, # number of bytes in bitmap
260266
)

0 commit comments

Comments
 (0)