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:
eeda1c2
)
Bug fix
author
espen
<espen>
Thu, 16 Dec 2004 23:21:18 +0000
(23:21 +0000)
committer
espen
<espen>
Thu, 16 Dec 2004 23:21:18 +0000
(23:21 +0000)
glib/gparam.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gparam.lisp
b/glib/gparam.lisp
index ec24b969ad4172af1d429c4c89d08877b6df3adc..88c74d33123d368898b5dc2804dbe87881aa45a4 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
1 2004-11-19 13:02:51
espen Exp $
+;; $Id: gparam.lisp,v 1.1
2 2004-12-16 23:21:18
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-41,11
+41,11
@@
(defun gvalue-init (gvalue type &optional (value nil value-p))
(when value-p
(funcall (writer-function type) value gvalue +gvalue-value-offset+)))
(when value-p
(funcall (writer-function type) value gvalue +gvalue-value-offset+)))
-(defun gvalue-new (
type &optional
(value nil value-p))
+(defun gvalue-new (
&optional type
(value nil value-p))
(let ((gvalue (allocate-memory +gvalue-size+)))
(let ((gvalue (allocate-memory +gvalue-size+)))
- (
if value-p
-
(gvalue-init gvalue type value
)
-
(gvalue-init gvalue type
))
+ (
cond
+
(value-p (gvalue-init gvalue type value)
)
+
(type (gvalue-init gvalue type)
))
gvalue))
(defun gvalue-free (gvalue &optional (unset-p t))
gvalue))
(defun gvalue-free (gvalue &optional (unset-p t))
@@
-68,8
+68,8
@@
(defun gvalue-set (gvalue value)
(defmacro with-gvalue ((gvalue type &optional (value nil value-p)) &body body)
`(let ((,gvalue ,(if value-p
(defmacro with-gvalue ((gvalue type &optional (value nil value-p)) &body body)
`(let ((,gvalue ,(if value-p
- `(gvalue-new
'
,type ,value)
- `(gvalue-new
',type ,value
))))
+ `(gvalue-new ,type ,value)
+ `(gvalue-new))))
(unwind-protect
(progn
,@body
(unwind-protect
(progn
,@body