Re: [Vala] 2 bugs in gtk+ bindings



On Tue, 2007-08-21 at 16:29 +0200, Jan Van Buggenhout,,, wrote:
Attached are 2 test-cases for bugs related to the IconFactory
infrastructure:

gtk_icon_source.vala:
GTK_ICON_SOURCE does not exist; valac compiles this but gcc gives
compile time warnings and a linker error:
$ valac --pkg=gtk+-2.0 gtk_icon_source.vala 
Compilation succeeded - 0 warning(s)
$ gcc `pkg-config --cflags --libs gtk+-2.0` gtk_icon_source.c 
gtk_icon_source.c: In function 'icon_source_test_icon_source_test_constructor':
gtk_icon_source.c:42: warning: passing argument 1 of
'gtk_icon_source_set_icon_name' makes pointer from integer without a cast
/tmp/ccYjBvJ0.o: In function `icon_source_test_icon_source_test_constructor':
gtk_icon_source.c:(.text+0x85): undefined reference to `GTK_ICON_SOURCE'
collect2: ld returned 1 exit status

GtkIconSource is not a GObject, that means that you can't subtype it in
Vala. The bug here is just that the Vala compiler doesn't report an
error where it should.

gtk_icon_set_free.vala:
gtk_icon_set_free does not exist; valac compiles this but gcc gives a linker
error:
$ valac --pkg=gtk+-2.0 gtk_icon_set_free.vala 
Compilation succeeded - 0 warning(s)
$ gcc `pkg-config --cflags --libs gtk+-2.0` gtk_icon_set_free.c 
/tmp/ccqzowBw.o: In function `icon_set_test_main':
gtk_icon_set_free.c:(.text+0x1b): undefined reference to `gtk_icon_set_free'
collect2: ld returned 1 exit status

Fixed in SVN.

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]