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:
6375253
)
Added method to generic function PROXY-INSTANCE-SIZE
author
espen
<espen>
Wed, 12 Jan 2005 13:35:19 +0000
(13:35 +0000)
committer
espen
<espen>
Wed, 12 Jan 2005 13:35:19 +0000
(13:35 +0000)
glib/proxy.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/proxy.lisp
b/glib/proxy.lisp
index e1131d456713b924fbe6833e0ea825769f4f18fd..2e473947b6058122ce74ff06665ae50728a48133 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
7 2004-12-26 11:40:14
espen Exp $
+;; $Id: proxy.lisp,v 1.1
8 2005-01-12 13:35:19
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-402,6
+402,9
@@
(defmethod validate-superclass ((class proxy-class) (super standard-class))
(defmethod proxy-instance-size (class)
(declare (ignore class))
0)
(defmethod proxy-instance-size (class)
(declare (ignore class))
0)
+
+ (defmethod proxy-instance-size ((class-name symbol))
+ (proxy-instance-size (find-class class-name)))
)
(defmethod alien-type ((class proxy-class) &rest args)
)
(defmethod alien-type ((class proxy-class) &rest args)
@@
-470,7
+473,7
@@
(defmethod destroy-function ((class proxy-class) &rest args)
(unreference-foreign class (sap-ref-sap location offset))))
(defmethod unbound-value ((class proxy-class) &rest args)
(unreference-foreign class (sap-ref-sap location offset))))
(defmethod unbound-value ((class proxy-class) &rest args)
- (declare (ignore
type
args))
+ (declare (ignore args))
(values t nil))
(defgeneric ensure-proxy-instance (class location)
(values t nil))
(defgeneric ensure-proxy-instance (class location)
@@
-501,7
+504,7
@@
(defmethod initialize-instance ((struct struct) &rest initargs)
(let ((size (proxy-instance-size (class-of struct))))
(if (zerop size)
(error "~A has zero size" (class-of struct))
(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)))))
+ (setf (slot-value struct 'location) (allocate-memory size)))))
(call-next-method))
(call-next-method))