This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: guile-gobject problem


Andy Wingo <wingo@pobox.com> writes:

> There've been some internet difficulties at my workplace, but hopefully
> they're sorted out now...
>
> On Mon, 11 Aug 2003, Andreas Rottmann wrote:
>
>> | DSTWService* <dstwservice*>
>> | gboolean <gboolean>
>> | GType <gtype>
>> | char* <char*>
>> | none <none>
>> | gunichar* <gunichar*>
>
> Hmm, looks like you forgot to set the standard wrapset as a used
> wrapset. Check the gw-atk-spec.scm for more details, bit it will suffice
> to add (gw:wrapset-depends-on ws "guile-gnome-gw-standard") to your
> wrapset definition code.
>
> Of course, you have to also depend on glib and gobject if you want those
> types to be recognized as well.
>
I posted the wrng .spec version, I had those depends in place. In fact
this is a bug in defs-support.scm; the function doesn't search in the
depended-on wrapsets if there are no types registered or the
wrapset. The attached patch should fix this.

Index: gnome/gobject/defs-support.scm
===================================================================
RCS file: /cvsroot/guile-gtk/guile-gobject/gnome/gobject/defs-support.scm,v
retrieving revision 1.3
diff -u -p -r1.3 defs-support.scm
--- gnome/gobject/defs-support.scm	1 Jul 2003 16:10:25 -0000	1.3
+++ gnome/gobject/defs-support.scm	15 Aug 2003 13:46:59 -0000
@@ -34,20 +34,20 @@
 (define (recursive-type-find ws type)
   (let* ((ws-name (gw:wrapset-get-name ws))
          (types-hash (hash-ref types-hash-hash ws-name)))
-    (if types-hash
-        (let ((ret (hash-ref types-hash type)))
-          (if ret
-              ret
-              (call-with-current-continuation
-               (lambda (exit)
-                 (for-each
-                  (lambda (ws)
-                    (let ((ret (recursive-type-find ws type)))
-                      (if ret
-                          (exit ret))))
-                  (wrapset-get-wrapsets-depended-on ws))
-                 #f))))
-        #f)))
+    (let ((ret (if types-hash
+                   (hash-ref types-hash type)
+                   #f)))
+      (if ret
+          ret
+          (call-with-current-continuation
+           (lambda (exit)
+             (for-each
+              (lambda (ws)
+                (let ((ret (recursive-type-find ws type)))
+                  (if ret
+                      (exit ret))))
+              (wrapset-get-wrapsets-depended-on ws))
+             #f))))))
 
 ;; find the gwrap type name for a given type name in a defs file, or
 ;; wrap the type as an opaque gpointer -- this thing is getting nasty!
Regards, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]