On 23.05.2018 11:03, gtk-perl-l...@talkvideo.net wrote:
A single-line Perl command like:

perl -e "use Gtk3;"

Results in the following error:

cannot make GdkRectangle synonymous to the unregistered type CairoRectangleInt 
at C:/msys64/mingw64/lib/perl5/site_perl/Gtk3.pm line 479.

Haven't seen that one before. The only possible reasons I can think of are: a) Cairo::GObject is linked against a different cairo-gobject library than the one Gtk3/Glib::Object::Introspection see at runtime, or b) there's a race condition between the BOOT section in Cairo::GObject and the import sub in Gtk3.

With the attached patches, what's the output of "perl -e'use Gtk3'" on your system?

On mine, it is:

# perl -e'use Gtk3'
Cairo::GObject: registering 94192984588768 (CairoRectangleInt)
Glib: trying to look up 94192984588768 (CairoRectangleInt)
diff --git a/CairoGObject.xs b/CairoGObject.xs
index ab1c70b..23428a3 100644
--- a/CairoGObject.xs
+++ b/CairoGObject.xs
@@ -283,6 +283,7 @@ BOOT:
 	                      &surface_wrapper_class);
 	gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE, "Cairo::Rectangle",
 	                      &rectangle_wrapper_class);
+	warn ("Cairo::GObject: registering %ld (%s)\n", CAIRO_GOBJECT_TYPE_RECTANGLE_INT, g_type_name (CAIRO_GOBJECT_TYPE_RECTANGLE_INT));
 	gperl_register_boxed (CAIRO_GOBJECT_TYPE_RECTANGLE_INT, "Cairo::RectangleInt",
 	                      &rectangle_int_wrapper_class);
 	gperl_register_boxed (CAIRO_GOBJECT_TYPE_REGION, "Cairo::Region",
diff --git a/GBoxed.xs b/GBoxed.xs
index 5c726aa..1b623df 100644
--- a/GBoxed.xs
+++ b/GBoxed.xs
@@ -287,6 +287,7 @@ gperl_register_boxed_synonym (GType registered_gtype,
 
 	G_LOCK (info_by_gtype);
 
+	warn ("Glib: trying to look up %ld (%s)\n", registered_gtype, g_type_name (registered_gtype));
 	registered_boxed_info = (BoxedInfo *)
 		g_hash_table_lookup (info_by_gtype, (gpointer) registered_gtype);
 
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to