Gtk2::CodeGen enhancements



f you are working on an extension outside of gtk2-perl-xs cvs and you use Gtk2::CodeGen->write_boot in your Makefile.PL (or you couldn't because it was broken), then this is important to you. if not, then you can happily ignore this.


write_boot was broken. now it's fixed in CVS, but it may break your code if you did anything fancier than "Gtk2::CodeGen->write_boot;" none of the modules in gtk2-perl-xs did anything fancy, but they do now.


the purpose of write_boot is to write an xsh file which is included from the BOOT: section of the xs file that actually gets booted by the bootstrap call in your pm file. it is imperative that you do not include the boot symbol for that module in the boot.xsh, or you get an infinite loop. however, the previous heuristic for ignoring the already-booted module was broken --- it just ignored any package name with colons in it. this works for Gtk2 and Gnome2, but not for Gnome2::Print or Gnome2::Canvas. that rather sucks.

the fix was to pass in a regex that specifies the package name(s) to ignore. of course, this means that the arguments passed to write_boot have changed (they sucked anyway, so this is not a bad thing), but none of the defaults have changed.

GnomeCanvas/Makefile.PL and GnomeCanvas/xs/GnomeCanvas.xs have already been modified to take advantage of this. (whereas before the change it simply couldn't use write_boot and i had to code the boot by hand, like in Glib/Glib.xs)


write_boot passed some stuff to grep; grep isn't a common thing on windows (yes, i was trying to build a native gtk2-perl on windows today, more on that in a couple of days), so i fixed it to read the files directly. this actually sped things up from 0.510 seconds to 0.410 seconds on my athlon. natch.


i have another version of the module with new POD in it, but it's on a machine i can't get to from here, so that'll have to wait until tomorrow.




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