X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/4d1fea77a51c2d136ac3a304aa749f599f35ef81..4b2f29e4fe19e47de191be36b4dca0982acebb9a:/glib/gtype.lisp?ds=sidebyside diff --git a/glib/gtype.lisp b/glib/gtype.lisp index 6b7a3b1..f486211 100644 --- 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. -;; $Id: gtype.lisp,v 1.47 2006/02/26 15:30:01 espen Exp $ +;; $Id: gtype.lisp,v 1.51 2006/04/18 11:42:20 espen Exp $ (in-package "GLIB") @@ -30,7 +30,7 @@ (defbinding type-init () nil) (type-init) -(deftype type-number () '(unsigned 32)) +(deftype type-number () 'unsigned-long) (deftype gtype () 'symbol) @@ -144,6 +144,9 @@ (register-type (car type) (cdr type))) *registered-types*) (mapc #'(lambda (type) + (apply #'register-new-type type)) + *registered-static-types*) + (mapc #'(lambda (type) (register-type-alias (car type) (cdr type))) *registered-type-aliases*)) @@ -197,7 +200,8 @@ (unwind-protect (loop as symbol = (let ((line (read-line (process-output process) nil))) - (when line (subseq line 11))) + (when line + (subseq line (1+ (position #\Space line :from-end t))))) while symbol when (and (> (length symbol) 9) @@ -297,7 +301,6 @@ (defmethod finalize-inheritance ((class ginstance-class)) - (call-next-method) (let* ((class-name (class-name class)) (super (most-specific-proxy-superclass class)) (gtype (or @@ -319,8 +322,8 @@ (not (eq (class-name super) (supertype type-number)))) (warn "Super class mismatch between CLOS and GObject for ~A" class-name))) - - (update-size class)) + (update-size class) + (call-next-method)) (defmethod shared-initialize ((class ginstance-class) names &rest initargs) @@ -385,9 +388,10 @@ (error "Doing copy-from-alien on a ref. counted class is most certainly an error, but if it really is what you want you should use REFERENCE-FOREIGN on the returned instance instead.")) (define-type-method reader-function ((type ginstance)) - #'(lambda (location &optional (offset 0) weak-p) - (declare (ignore weak-p)) - (ensure-proxy-instance type (sap-ref-sap location offset)))) + (let ((class (type-expand type))) + #'(lambda (location &optional (offset 0) weak-p) + (declare (ignore weak-p)) + (ensure-proxy-instance class (sap-ref-sap location offset))))) ;;;; Registering fundamental types