Permalink
Browse files

fixed problem with 'g_type_tag_to_string'

  • Loading branch information...
akapav committed Feb 15, 2012
1 parent 73d3bc6 commit bd2c877298b0fff23936522565c2e5bd0f3b8c9f
Showing with 6 additions and 3 deletions.
  1. +5 −3 girepos-ffi.rkt
  2. +1 −0 girepository.rkt
View
@@ -345,11 +345,13 @@
(error 20)
(unichar 21))
-;;todo: chack what's going on -- always returns "unknown"
+
(ffi-wrap "g_type_tag_to_string"
- ( _typeinfo-ptr -> _string))
+ ( _int -> _string))
-(define/provide type->string g-type-tag-to-string)
+(define/provide (type->string type-info)
+ (let ((tag (g-type-info-get-tag type-info)))
+ (g-type-tag-to-string tag)))
;; huh, modeled after following definition from the doc:
;; #define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY || tag == GI_TYPE_TAG_UNICHAR)
View
@@ -43,6 +43,7 @@
(list (let ((iface (gir:type-interface rt)))
(if iface (gir:get-type iface) '_))
(gir:type-tag rt)
+ (gir:type->string rt)
(gir:type-is-pointer? rt)))
(gir:callable-arguments clbl))))))

0 comments on commit bd2c877

Please sign in to comment.