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:
f53fad5
)
Fixed bug so that sub-classing of gobject-classes works
author
espen
<espen>
Thu, 2 Feb 2006 17:56:09 +0000
(17:56 +0000)
committer
espen
<espen>
Thu, 2 Feb 2006 17:56:09 +0000
(17:56 +0000)
glib/gtype.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gtype.lisp
b/glib/gtype.lisp
index 72b44760434ce779cfbd339759073f41de9e1fed..43b72202c7cec24b77924b0a2dee8b8dcfbe1556 100644
(file)
--- a/
glib/gtype.lisp
+++ b/
glib/gtype.lisp
@@
-20,7
+20,7
@@
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gtype.lisp,v 1.3
6 2006/02/01 22:48:3
9 espen Exp $
+;; $Id: gtype.lisp,v 1.3
7 2006/02/02 17:56:0
9 espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-279,29
+279,22
@@
(defun register-new-type (type parent &optional foreign-name)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass ginstance-class (proxy-class)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass ginstance-class (proxy-class)
- ((foreign-init))))
-
-
-(defmethod shared-initialize ((class ginstance-class) names &key name gtype)
- (call-next-method)
- (setf
- (slot-value class 'foreign-init)
- (or (first gtype) (default-type-init-name (or name (class-name class))))))
+ ((gtype :initarg :gtype :initform nil :reader ginstance-class-gtype))))
(defmethod finalize-inheritance ((class ginstance-class))
(call-next-method)
(let* ((class-name (class-name class))
(super (most-specific-proxy-superclass class))
(defmethod finalize-inheritance ((class ginstance-class))
(call-next-method)
(let* ((class-name (class-name class))
(super (most-specific-proxy-superclass class))
- (foreign-init (slot-value class 'foreign-init))
+ (gtype (or
+ (first (ginstance-class-gtype class))
+ (default-alien-type-name class-name)))
(type-number
(or
(find-type-number class-name)
(type-number
(or
(find-type-number class-name)
- (if (or
- (symbolp foreign-init)
- (type-number-from-glib-name foreign-init nil))
- (register-type class-name foreign-init)
- (register-new-type class-name (class-name super) foreign-init)))))
+ (if (or (symbolp gtype) (type-number-from-glib-name gtype nil))
+ (register-type class-name gtype)
+ (register-new-type class-name (class-name super) gtype)))))
(unless (eq (class-name super) (supertype type-number))
(warn "~A is the super type for ~A in the gobject type system."
(supertype type-number) class-name))
(unless (eq (class-name super) (supertype type-number))
(warn "~A is the super type for ~A in the gobject type system."
(supertype type-number) class-name))