summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2004-07-19 09:45:46 (GMT)
committerThomas Heller <theller@ctypes.org>2004-07-19 09:45:46 (GMT)
commitb8f134e3c3a4bd2e88d56d97c22f52c2e1c50f76 (patch)
tree34478a239d65d9bb837bb6d4fc69093202a0b655 /Lib/distutils
parent5ef601854efbf467c45e2fe2b087833c1916ab54 (diff)
downloadcpython-b8f134e3c3a4bd2e88d56d97c22f52c2e1c50f76.zip
cpython-b8f134e3c3a4bd2e88d56d97c22f52c2e1c50f76.tar.gz
cpython-b8f134e3c3a4bd2e88d56d97c22f52c2e1c50f76.tar.bz2
The binary layout of cfgdata has changed, so the magic number has to
change as well. Add a comment explaining this.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/bdist_wininst.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index d91c089..79c95ae 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -253,8 +253,14 @@ class bdist_wininst (Command):
# empty pre-install script
cfgdata = cfgdata + "\0"
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",
- 0x1234567A, # tag
+ 0x1234567B, # tag
len(cfgdata), # length
bitmaplen, # number of bytes in bitmap
)