X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/e3b11dffd804e2c72ba88c79c3ee7f63212e3309..b7c49e0c03879ad0af9fcfd0910357290f32d35a:/glib/gtype.lisp diff --git a/glib/gtype.lisp b/glib/gtype.lisp index cc027b4..747f0a8 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.57 2006-08-31 09:51:08 espen Exp $ +;; $Id: gtype.lisp,v 1.61 2007-02-23 12:53:08 espen Exp $ (in-package "GLIB") @@ -30,7 +30,10 @@ (defbinding type-init () nil) (type-init) -(deftype type-number () 'unsigned-long) +(eval-when (:compile-toplevel :load-toplevel :execute) + (defbinding (bitsize-of-gtype "bitsize_of_gtype") () unsigned-int)) + +(deftype type-number () `(unsigned-byte ,(bitsize-of-gtype))) (deftype gtype () 'symbol) @@ -221,12 +224,13 @@ as symbol = (when line (let ((pos (position #\Space line :from-end t))) #-darwin(subseq line (1+ pos)) - #+darwinf + #+darwin (when (char= (char line (1- pos)) #\T) (subseq line (+ pos 2))))) while line when (and symbol (> (length symbol) 9) + (not (char= (char symbol 0) #\_)) (or (not prefixes) (some #'(lambda (prefix) @@ -367,7 +371,7 @@ ;;;; Superclass for wrapping types in the glib type system (eval-when (:compile-toplevel :load-toplevel :execute) - (defclass ginstance (proxy) + (defclass ginstance (ref-counted-object) (;(class :allocation :alien :type pointer :offset 0) ) (:metaclass proxy-class) @@ -399,12 +403,6 @@ (error "Object at ~A has an unkown type number: ~A" location (%type-number-of-ginstance location))))) -(define-type-method from-alien-form ((type ginstance) form &key (ref :copy)) - (call-next-method type form :ref ref)) - -(define-type-method from-alien-function ((type ginstance) &key (ref :copy)) - (call-next-method type :ref ref)) - ;;;; Registering fundamental types