[bknr-cvs] manuel changed trunk/thirdparty/cl-gd/
BKNR Commits
bknr at bknr.net
Mon Sep 13 19:58:07 UTC 2010
Revision: 4605
Author: manuel
URL: http://bknr.net/trac/changeset/4605
cl-gd fixes zum laufen auf 64bit openmcl, *cough*
U trunk/thirdparty/cl-gd/Makefile
U trunk/thirdparty/cl-gd/gd-uffi.lisp
U trunk/thirdparty/cl-gd/misc.lisp
Modified: trunk/thirdparty/cl-gd/Makefile
===================================================================
--- trunk/thirdparty/cl-gd/Makefile 2010-09-13 15:22:30 UTC (rev 4604)
+++ trunk/thirdparty/cl-gd/Makefile 2010-09-13 19:58:06 UTC (rev 4605)
@@ -8,4 +8,4 @@
# this should work for Mac OS X
cl-gd-glue.dylib:
- gcc -arch i386 -lgd -lpng -lz -lfreetype -ljpeg -dynamiclib cl-gd-glue.c -o cl-gd-glue.dylib -I/opt/local/include -L/opt/local/lib
+ gcc -arch i386 -arch x86_64 -lgif -lgd -lpng -lz -lfreetype -ljpeg -dynamiclib cl-gd-glue.c -o cl-gd-glue.dylib -I/opt/local/include -L/opt/local/lib
Modified: trunk/thirdparty/cl-gd/gd-uffi.lisp
===================================================================
--- trunk/thirdparty/cl-gd/gd-uffi.lisp 2010-09-13 15:22:30 UTC (rev 4604)
+++ trunk/thirdparty/cl-gd/gd-uffi.lisp 2010-09-13 19:58:06 UTC (rev 4605)
@@ -35,7 +35,7 @@
(sx :int)
(sy :int)
(colors-total :int)
- (red (:array :int #.+max-colors+))
+ (red (:array :int #.+max-colors+) :offset 20)
(green (:array :int #.+max-colors+))
(blue (:array :int #.+max-colors+))
(open (:array :int #.+max-colors+))
@@ -74,6 +74,12 @@
(cx2 :int)
(cy2 :int))
+;; XXX evil hack
+#+(and :openmcl :64-bit-target)
+(defmethod cffi::foreign-type-alignment ((type uffi-array-type))
+ 4)
+
+
(def-type pixels-array (* (* :unsigned-char)))
(def-type pixels-row (* :unsigned-char))
(def-type t-pixels-array (* (* :int)))
Modified: trunk/thirdparty/cl-gd/misc.lisp
===================================================================
--- trunk/thirdparty/cl-gd/misc.lisp 2010-09-13 15:22:30 UTC (rev 4604)
+++ trunk/thirdparty/cl-gd/misc.lisp 2010-09-13 19:58:06 UTC (rev 4605)
@@ -220,12 +220,12 @@
(let ((,raw-pixels (get-slot-value ,img 'gd-image 'pixels)))
(declare (type pixels-array ,raw-pixels))
(dotimes (,y-var ,height)
- (let ((,row (deref-array ,raw-pixels '(:array (* :unsigned-char)) ,y-var)))
+ (let ((,row (deref-array ,raw-pixels '(:array (* :unsigned-byte)) ,y-var)))
(declare (type pixels-row ,row))
(macrolet ((do-pixels-in-row ((,x-var) &body ,inner-body)
`(dotimes (,,x-var ,',width)
(macrolet ((raw-pixel ()
- `(deref-array ,',',row '(:array :unsigned-char) ,',,x-var)))
+ `(deref-array ,',',row '(:array :unsigned-byte) ,',,x-var)))
(locally
,@,inner-body)))))
(locally
More information about the Bknr-cvs
mailing list