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:
e74cfca
)
Subclasses of STRUCT may now allocate foreign memory
author
espen
<espen>
Mon, 15 Nov 2004 19:20:55 +0000
(19:20 +0000)
committer
espen
<espen>
Mon, 15 Nov 2004 19:20:55 +0000
(19:20 +0000)
glib/proxy.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/proxy.lisp
b/glib/proxy.lisp
index 9058e234056f016d59a0e53adb7c2ea308dba000..88971c18173274903c2b0fe351506169c2d73d8f 100644
(file)
--- a/
glib/proxy.lisp
+++ b/
glib/proxy.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: proxy.lisp,v 1.1
2 2004-11-09 10:10:59
espen Exp $
+;; $Id: proxy.lisp,v 1.1
3 2004-11-15 19:20:55
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-408,10
+408,11
@@
(defclass struct (proxy)
(defmethod initialize-instance ((struct struct) &rest initargs)
(declare (ignore initargs))
(defmethod initialize-instance ((struct struct) &rest initargs)
(declare (ignore initargs))
- (let ((size (proxy-instance-size (class-of struct))))
- (if (zerop size)
- (error "~A has zero size" (class-of struct))
- (setf (slot-value struct 'location) (allocate-memory size))))
+ (unless (slot-boundp struct 'location)
+ (let ((size (proxy-instance-size (class-of struct))))
+ (if (zerop size)
+ (error "~A has zero size" (class-of struct))
+ (setf (slot-value struct 'location) (allocate-memory size)))))
(call-next-method))
(call-next-method))