;; 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.12 2004/11/09 10:10:59 espen Exp $
+;; $Id: proxy.lisp,v 1.13 2004/11/15 19:20:55 espen Exp $
(in-package "GLIB")
(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))