X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/8672dc09872e5520bc77f0c465e10e924d93a516..110bd96ce6f2ff1aa4f25f899e12a5c3e3125f61:/glib/gtype.lisp diff --git a/glib/gtype.lisp b/glib/gtype.lisp index 4b411e4..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.59 2007-01-02 18:39:42 espen Exp $ +;; $Id: gtype.lisp,v 1.61 2007-02-23 12:53:08 espen Exp $ (in-package "GLIB") @@ -30,7 +30,10 @@ (use-prefix "g") (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) @@ -368,7 +371,7 @@ (defmethod validate-superclass ((class ginstance-class) (super standard-class)) ;;;; 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) @@ -400,12 +403,6 @@ (defmethod make-proxy-instance :around ((class ginstance-class) location (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