chiark / gitweb /
Size of TYPE-NUMBER detected by calling C
authorespen <espen>
Fri, 23 Feb 2007 12:53:08 +0000 (12:53 +0000)
committerespen <espen>
Fri, 23 Feb 2007 12:53:08 +0000 (12:53 +0000)
glib/gtype.lisp

index 5141a37f461b762a72f6f0b7f7212d74c5dd12e5..1fa25432bee062155168cb76b6f72b53a4427a95 100644 (file)
@@ -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.60 2007/01/12 10:32:43 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)