Re: GType GString is not registered with gperl at Glib/Object/

On Sun, Nov 6, 2011 at 22:36, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 06.11.2011 22:18, Emmanuel Rodriguez wrote:

On Sun, Nov 6, 2011 at 21:44, Torsten Schoenfeld<kaffeetisch gmx de>

On 06.11.2011 21:25, Emmanuel Rodriguez wrote:

*** unhandled exception in callback:
*** Â GType GString (156083704) is not registered with gperl at
/usr/local/lib/perl/5.12.4/Glib/Object/ line 57.
*** Âignoring at /usr/local/share/perl/5.12.4/ line 104.

This comes from the code in Glib that handles boxed types. ÂIt turns out
that we don't have a boxed wrapper for G_TYPE_GSTRING. Â(To our defense,
this WebKit API is the first instance of GString occurring in an API that
I've seen.) ÂThe boxed wrapper would most likely be a very thin shell
newSVpv and SvPV. ÂThe G_TYPE_STRV wrapper might serve as an example.

(this time with a *reply to all*, sorry Torsten for the spam)

I can add the box type to Gtk3::WebKit but shouldn't it be better to
add it to Glib?

Yes, it should live in Glib.

I have a basic implementation based on your input [1]. Can you review my patch?

I don't know if I have to add a 'GPerlBoxedDestroyFunc', I'm guessing
that Perl's standard SV free should do fine.
I looked at the documentation of GString [2] and I don't see when
GString was first added to Glib which makes me guess that it has
always existed so there's no need of a #if GLIB_CHECK_VERSION() check.


What I don't get is that it was working fine previously. I was able to
do $data->{str} to access the content of the string.

That sounds like GString was handled as a bare struct back then, not as a
boxed type. ÂMaybe g-ir-scanner changed in the meantime, or maybe the Perl
Yes, I don't recall exactly when things changed I've upgraded all my
packages (webkit, perl-Glib, perl-Glib-Object-Introspection) and
suddenly the errors started to appear. I downgraded the perl packages
but the errors still remained.

Emmanuel Rodriguez

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