summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-04-03 14:44:07 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-04-03 14:44:07 (GMT)
commit4240b610f3cfa9e18ada581ec30616fba96f606e (patch)
tree7e1db9ed365192bd5e0c3127362db0aa89aa32fd
parent9a8cb84072842d183c3614b2a232d1426bd8c870 (diff)
downloadcpython-4240b610f3cfa9e18ada581ec30616fba96f606e.zip
cpython-4240b610f3cfa9e18ada581ec30616fba96f606e.tar.gz
cpython-4240b610f3cfa9e18ada581ec30616fba96f606e.tar.bz2
Use MacOS.string_id_to_buffer for the hack to convert string id() to
buffer address.
-rw-r--r--Mac/Demo/imgbrowse/mac_image.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Demo/imgbrowse/mac_image.py b/Mac/Demo/imgbrowse/mac_image.py
index e2639c9..c4b034e 100644
--- a/Mac/Demo/imgbrowse/mac_image.py
+++ b/Mac/Demo/imgbrowse/mac_image.py
@@ -3,6 +3,7 @@ import imgformat
import Qd
import time
import struct
+import MacOS
_fmt_to_mac = {
imgformat.macrgb16 : (16, 16, 3, 5),
@@ -13,7 +14,7 @@ def mkpixmap(w, h, fmt, data):
fmtinfo = _fmt_to_mac[fmt]
rv = struct.pack("lhhhhhhhlllhhhhlll",
- id(data)+16,
+ id(data)+MacOS.string_id_to_buffer, # HACK HACK!!
w*2 + 0x8000,
0, 0, h, w,
0,