[pygtk] Passing a GType from C to Python
Darren Hart
darren at dvhart.com
Sat Jan 2 09:16:27 WST 2010
On Fri, Jan 1, 2010 at 12:21 PM, Gian Mario Tagliaretti <gianmt at gnome.org>wrote:
> On Fri, Jan 1, 2010 at 8:02 AM, Darren Hart <darren at dvhart.com> wrote:
>
> Hi Darren,
>
> > converting gtype (G_TYPE_UINT): 28 to python object
> > Segmentation fault (core dumped)
>
> it's just a guess, I think the problem here is that G_TYPE_UINT is the
> type of guint, which at the end it's a typedef to unsigned int, it's
> not an object type (GObject, GBoxed, GEnum...), that might be the
> problem, I'm not sure btw,
>
Well, the column_types are stored as G_TYPE_UINT and G_TYPE_STRING. The C
prototype returns a "GType", not an object. So in this case we are looking
for the GType, not an object or value that is "of" that type.
I did some searching and from what I could tell from other projects, it
appears that I am using the pyg_type_wrapper_new() correctly, so I don't see
why it would segfault. Time to dig into the PyGObject implementation I
guess...
>
> cheers
> --
> Gian Mario Tagliaretti
> GNOME Foundation member
> gianmt at gnome.org
>
--
Darren Hart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20100101/2c192a74/attachment.htm
More information about the pygtk
mailing list