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:
74bad01
)
New binding GVALUE-P and some other changes
author
espen
<espen>
Mon, 3 Jan 2005 16:42:03 +0000
(16:42 +0000)
committer
espen
<espen>
Mon, 3 Jan 2005 16:42:03 +0000
(16:42 +0000)
glib/gparam.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gparam.lisp
b/glib/gparam.lisp
index 55965e2159b4fd4685f88293fb12b5df35c1c4eb..e2d4631f92040580a1ec2e7ad294fd5cd52f5185 100644
(file)
--- a/
glib/gparam.lisp
+++ b/
glib/gparam.lisp
@@
-15,12
+15,14
@@
;; 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: gparam.lisp,v 1.1
2 2004/12/16 23:21:18
espen Exp $
+;; $Id: gparam.lisp,v 1.1
3 2005/01/03 16:42:03
espen Exp $
(in-package "GLIB")
(deftype gvalue () 'pointer)
(in-package "GLIB")
(deftype gvalue () 'pointer)
+(register-type 'gvalue "GValue")
+
(eval-when (:compile-toplevel :load-toplevel :execute)
(defbinding (size-of-gvalue "size_of_gvalue") () unsigned-int))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defbinding (size-of-gvalue "size_of_gvalue") () unsigned-int))
@@
-66,14
+68,17
@@
(defun gvalue-set (gvalue value)
value gvalue +gvalue-value-offset+)
value)
value gvalue +gvalue-value-offset+)
value)
-(defmacro with-gvalue ((gvalue type &optional (value nil value-p)) &body body)
- `(let ((,gvalue ,(if value-p
+(defbinding (gvalue-p "g_type_check_value") () boolean
+ (location pointer))
+
+(defmacro with-gvalue ((gvalue &optional type value) &body body)
+ `(let ((,gvalue ,(if type
`(gvalue-new ,type ,value)
`(gvalue-new))))
(unwind-protect
(progn
,@body
`(gvalue-new ,type ,value)
`(gvalue-new))))
(unwind-protect
(progn
,@body
- ,(unless
value-p
`(gvalue-get ,gvalue)))
+ ,(unless
type
`(gvalue-get ,gvalue)))
(gvalue-free ,gvalue))))
(gvalue-free ,gvalue))))