With the current cvs the foo.pl below gets an error,
type Gtk2::Border is not registered with Glib-Perl at foo.pl line 8.
Chasing it down in gdb it looks like Gtk2.xs register.xsh registers
Gtk2::Border with gperl_register_boxed, and then the Gtk2::Entry boot
code re-registers it. On that second registration the info_by_gtype
update frees the boxed_info of the first registration, but the package
name string "Gtk2::Border" in that boxed_info is still in use as the key
in info_by_package. Changing g_hash_table_insert to
g_hash_table_replace to update the key in info_by_package seems to do
the trick.
The GType of GtkBorder is unchanging, so the info_by_gtype doesn't care
between _insert or _replace, if I'm not mistaken.
Is GtkEntry.xs meant to register Gtk2::Border, or can it be left to
register.xsh?
Attachment:
foo.pl
Description: Text Data
Attachment:
GBoxed.xs.boxed-reregister.diff
Description: Text Data