From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20819 invoked by alias); 25 May 2003 23:33:58 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 20787 invoked from network); 25 May 2003 23:33:57 -0000 Received: from unknown (HELO snoopy.pacific.net.au) (61.8.0.36) by sources.redhat.com with SMTP; 25 May 2003 23:33:57 -0000 Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.3) with ESMTP id h4PNXuPB002281 for ; Mon, 26 May 2003 09:33:56 +1000 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h4PNXtQg011245 for ; Mon, 26 May 2003 09:33:55 +1000 (EST) Received: from localhost (ppp29.dyn228.pacific.net.au [203.143.228.29]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h4PNXsYZ007451 for ; Mon, 26 May 2003 09:33:54 +1000 (EST) Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19K4zq-0000Pz-00; Mon, 26 May 2003 09:33:46 +1000 To: guile-gtk@sources.redhat.com Subject: examples/tictactoe.scm From: Kevin Ryde Mail-Copies-To: never Date: Sun, 25 May 2003 23:33:00 -0000 Message-ID: <87wugelhye.fsf@zip.com.au> User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-q2/txt/msg00112.txt.bz2 --=-=-= Content-length: 630 I tried to run examples/tictactoe.scm and noticed gtk-class-new and gtk-signal-new-generic seem to have bit-rotted slightly. * guile-gtk.c (gtk_class_new): Use gtk_type_query rather than gtk_type_get_info. (gtk_signal_new_generic): Use sgtk_callback_marshal for marshalling. Not sure if this is actually right, but it takes it from not working to seeming to work. :) I see the gtk changelog says gtk_type_get_info got reverted. I guess gtk_type_query is the way to go, for gtk 1.2 at least. Unless anyone knows better I'd think it could be used unconditionally, no need for an autoconf check by now. --=-=-= Content-Disposition: attachment; filename=guile-gtk.c.tictactoe.diff Content-length: 1174 --- guile-gtk.c.~1.15.~ 2003-05-24 10:02:45.000000000 +1000 +++ guile-gtk.c 2003-05-25 12:15:41.000000000 +1000 @@ -2565,19 +2565,21 @@ gtk_class_new (GtkType parent_type, gchar *name) { GtkTypeInfo info = { 0 }; - GtkTypeInfo parent_info; + GtkTypeQuery *parent_query; - if (!gtk_type_get_info (parent_type, &parent_info)) + parent_query = gtk_type_query (parent_type); + if (parent_query == NULL) return GTK_TYPE_INVALID; info.type_name = name; - info.object_size = parent_info.object_size; - info.class_size = parent_info.class_size; + info.object_size = parent_query->object_size; + info.class_size = parent_query->class_size; info.class_init_func = NULL; info.object_init_func = NULL; #if GTK_MAJOR_VERSION > 1 || GTK_MINOR_VERSION > 0 info.base_class_init_func = NULL; #endif + g_free (parent_query); return gtk_type_unique (parent_type, &info); } @@ -2596,7 +2598,7 @@ return 0; signal_id = gtk_signal_newv (name, signal_flags, type, - 0, NULL, + 0, sgtk_callback_marshal, return_type, nparams, params); if (signal_id > 0) gtk_object_class_add_signals (gtk_type_class (type), --=-=-=--