]> granicus.if.org Git - python/commitdiff
Use MacOS.string_id_to_buffer for the hack to convert string id() to
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 3 Apr 1997 14:44:07 +0000 (14:44 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 3 Apr 1997 14:44:07 +0000 (14:44 +0000)
buffer address.

Mac/Demo/imgbrowse/mac_image.py

index e2639c9e5111f30774c9171146976bb7ff926da5..c4b034ec29e9eabcbeef9f7e749f210d8cabbcae 100644 (file)
@@ -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,