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:
3330adc
)
Fixed GVALUE macro
author
espen
<espen>
Wed, 12 Jan 2005 13:31:57 +0000
(13:31 +0000)
committer
espen
<espen>
Wed, 12 Jan 2005 13:31:57 +0000
(13:31 +0000)
glib/gparam.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gparam.lisp
b/glib/gparam.lisp
index e2d4631f92040580a1ec2e7ad294fd5cd52f5185..ea00893e93c6ccce5e3fae3cbea9bae62c9e7bd3 100644
(file)
--- a/
glib/gparam.lisp
+++ b/
glib/gparam.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: gparam.lisp,v 1.1
3 2005/01/03 16:42:03
espen Exp $
+;; $Id: gparam.lisp,v 1.1
4 2005/01/12 13:31:57
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-71,14
+71,15
@@
(defun gvalue-set (gvalue value)
(defbinding (gvalue-p "g_type_check_value") () boolean
(location pointer))
(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))))
+(defmacro with-gvalue ((gvalue &optional type (value nil value-p)) &body body)
+ `(let ((,gvalue ,(cond
+ ((and type value-p) `(gvalue-new ,type ,value))
+ (type `(gvalue-new ,type))
+ (`(gvalue-new)))))
(unwind-protect
(progn
,@body
(unwind-protect
(progn
,@body
- ,(unless
type
`(gvalue-get ,gvalue)))
+ ,(unless
value-p
`(gvalue-get ,gvalue)))
(gvalue-free ,gvalue))))
(gvalue-free ,gvalue))))