summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-10-22 21:59:23 +0000
committerJack Jansen <jack.jansen@cwi.nl>2000-10-22 21:59:23 +0000
commitfa1ab0bb38e54d79f6051d6daf8371faa3815d4f (patch)
tree28f23fff59d1081962c63267783100f7d25c45d0 /Mac
parent73097c95f8ed4d387867a1439447184039bf7dda (diff)
downloadcpython-fa1ab0bb38e54d79f6051d6daf8371faa3815d4f.tar.gz
struct.pack has become picky about h (short) and H (unsigned short).
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Demo/imgbrowse/mac_image.py2
-rw-r--r--Mac/Lib/PixMapWrapper.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Demo/imgbrowse/mac_image.py b/Mac/Demo/imgbrowse/mac_image.py
index c4b034ec29..4e3881f9f4 100644
--- a/Mac/Demo/imgbrowse/mac_image.py
+++ b/Mac/Demo/imgbrowse/mac_image.py
@@ -13,7 +13,7 @@ def mkpixmap(w, h, fmt, data):
"""kludge a pixmap together"""
fmtinfo = _fmt_to_mac[fmt]
- rv = struct.pack("lhhhhhhhlllhhhhlll",
+ rv = struct.pack("lHhhhhhhlllhhhhlll",
id(data)+MacOS.string_id_to_buffer, # HACK HACK!!
w*2 + 0x8000,
0, 0, h, w,
diff --git a/Mac/Lib/PixMapWrapper.py b/Mac/Lib/PixMapWrapper.py
index 39e5f8eab0..72a64ba0b9 100644
--- a/Mac/Lib/PixMapWrapper.py
+++ b/Mac/Lib/PixMapWrapper.py
@@ -15,7 +15,7 @@ import imgformat
# PixMap data structure element format (as used with struct)
_pmElemFormat = {
'baseAddr':'l', # address of pixel data
- 'rowBytes':'h', # bytes per row, plus 0x8000
+ 'rowBytes':'H', # bytes per row, plus 0x8000
'bounds':'hhhh', # coordinates imposed over pixel data
'top':'h',
'left':'h',