[mcclim-cvs] CVS mcclim/Backends/gtkairo

dlichteblau dlichteblau at common-lisp.net
Sun Nov 5 17:29:11 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Backends/gtkairo
In directory clnet:/tmp/cvs-serv23936

Modified Files:
	cairo-ffi.lisp gtk-ffi.lisp 
Log Message:
Patch by Douglas Crosher, <4543F391.9000708 at scieneer.com>


--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/cairo-ffi.lisp	2006/10/28 17:49:24	1.6
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/cairo-ffi.lisp	2006/11/05 17:29:11	1.7
@@ -41,14 +41,8 @@
 	 , at args)
        (defun ,wrapper ,argnames
 	 (multiple-value-prog1
-             ;; FIXME: This should probably go into with-cairo-floats.
-             ;; (see http://www.ircbrowse.com/channel/lisp/20061028?utime=3371045114#utime_requested)
-	     #-scl (,actual , at argnames)
-	     #+scl 
-	     (ext:with-float-traps-masked (:underflow :overflow :inexact
-						      :divide-by-zero :invalid)
-	       (,actual , at argnames))
-	     (let ((status (cairo_status ,(car argnames))))
+	     (,actual , at argnames)
+	   (let ((status (cairo_status ,(car argnames))))
 	     (unless (eq status :success)
 	       (error "~A returned with status ~A" ,name status))))))))
 
--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gtk-ffi.lisp	2006/11/05 17:22:23	1.8
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/gtk-ffi.lisp	2006/11/05 17:29:11	1.9
@@ -85,12 +85,23 @@
 ;; reset all options afterwards, I get lisp errors like f-p-i-o for, say,
 ;; (ATAN -13 13/2) in McCLIM.  Isn't SBCL responsible for calling C code
 ;; with the with the modes C code expects?  Or does cairo change them?
+#+sbcl
 (defmacro with-cairo-floats ((&optional) &body body)
   `(unwind-protect
        (progn
-	 #+sbcl (sb-int:set-floating-point-modes :traps nil)
+	 (sb-int:set-floating-point-modes :traps nil)
 	 , at body)
-     #+sbcl (apply #'sb-int:set-floating-point-modes *normal-modes*)))
+     (apply #'sb-int:set-floating-point-modes *normal-modes*)))
+
+#+(or scl cmu)
+(defmacro with-cairo-floats ((&optional) &body body)
+  `(ext:with-float-traps-masked
+       (:underflow :overflow :inexact :divide-by-zero :invalid)
+     , at body))
+
+#-(or scl cmu sbcl)
+(defmacro with-cairo-floats ((&optional) &body body)
+  `(progn , at body))
 
 ;; Note: There's no need for locking in single threaded mode for most
 ;; functions, except that the main loop functions try to release the




More information about the Mcclim-cvs mailing list