gtk2-perl cvs build problem (fix included, questions asked)



after months of agonizing emergency work on other projects, i'm finally
able to put real time into gtk2-perl.  ...and i see i'm waaaaay behind. 
you guys have done a lot of work!


just checked out the gtk2-perl code from CVS, and it wouldn't build.

the build bombed with:

  ListStore.xs: In function `gtkperl_list_store_remove':
  ListStore.xs:66: void value not ignored as it ought to be
  make: *** [ListStore.o] Error 1

sure enough, 
Gtk2/src/ListStore.c:66:  return gtk_list_store_remove(....);

checking the headers:

/usr/include/gtk-2.0/gtk/gtkliststore.h:93:
void          gtk_list_store_remove           (GtkListStore *list_store,

and gtkversion.h says 2.0.6.

however, according to the API docs on
http://developer.gnome.org/doc/API/2.0/gtk/GtkListStore.html , it's 

gboolean    gtk_list_store_remove           (GtkListStore *list_store,



awwwwww, crap.  this is a version difference, and it looks like the cvs
code is written for gtk 2.2.x.


simple enough, change the line to:

#if GTK_MINOR_VERSION > 0
  return
gtk_list_store_remove(SvGtkListStore(list_store),SvGtkTreeIter(iter));
#else
  gtk_list_store_remove(SvGtkListStore(list_store),SvGtkTreeIter(iter));
  return TRUE;
#endif



but this solution doesn't scale --- i don't think you'd want to do this
for fifty or a hundred functions.  are there any plans to handle this
sort of problem with autogen scripts?


-- 
muppet <scott asofyet org>




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