chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8bca7df
)
Added required translation methods for single- and double-float
author
espen
<espen>
Fri, 25 Feb 2005 23:55:06 +0000
(23:55 +0000)
committer
espen
<espen>
Fri, 25 Feb 2005 23:55:06 +0000
(23:55 +0000)
glib/ffi.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/ffi.lisp
b/glib/ffi.lisp
index 0512abad1d40f308b6344e1c4b86612fc60d9ca7..d3582f7b4aea28da18d489a1147811e595bb5bc6 100644
(file)
--- a/
glib/ffi.lisp
+++ b/
glib/ffi.lisp
@@
-15,7
+15,7
@@
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: ffi.lisp,v 1.1
6 2005/02/22 17:27:25
espen Exp $
+;; $Id: ffi.lisp,v 1.1
7 2005/02/25 23:55:06
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-461,6
+461,15
@@
(defmethod size-of ((type (eql 'single-float)) &rest args)
(declare (ignore type args))
+size-of-float+)
(declare (ignore type args))
+size-of-float+)
+(defmethod to-alien-form (form (type (eql 'single-float)) &rest args)
+ (declare (ignore type args))
+ `(coerce ,form 'single-float))
+
+(defmethod to-alien-function ((type (eql 'single-float)) &rest args)
+ (declare (ignore type args))
+ #'(lambda (number)
+ (coerce number 'single-float)))
+
(defmethod writer-function ((type (eql 'single-float)) &rest args)
(declare (ignore type args))
#'(lambda (value location &optional (offset 0))
(defmethod writer-function ((type (eql 'single-float)) &rest args)
(declare (ignore type args))
#'(lambda (value location &optional (offset 0))
@@
-480,6
+489,15
@@
(defmethod size-of ((type (eql 'double-float)) &rest args)
(declare (ignore type args))
+size-of-double+)
(declare (ignore type args))
+size-of-double+)
+(defmethod to-alien-form (form (type (eql 'double-float)) &rest args)
+ (declare (ignore type args))
+ `(coerce ,form 'double-float))
+
+(defmethod to-alien-function ((type (eql 'double-float)) &rest args)
+ (declare (ignore type args))
+ #'(lambda (number)
+ (coerce number 'double-float)))
+
(defmethod writer-function ((type (eql 'double-float)) &rest args)
(declare (ignore type args))
#'(lambda (value location &optional (offset 0))
(defmethod writer-function ((type (eql 'double-float)) &rest args)
(declare (ignore type args))
#'(lambda (value location &optional (offset 0))