Re: gnome_vfs_uri_list_parse unwrapped?
- From: Daniel Elstner <daniel kitta googlemail com>
- To: John Spray <jcspray icculus org>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: gnome_vfs_uri_list_parse unwrapped?
- Date: Mon, 15 Jan 2007 02:57:07 +0100
Am Sonntag, den 14.01.2007, 21:10 +0000 schrieb John Spray:
> Here's an almost-working patch. It works fine if I instead use
> std::list as the container for the return value, but something's causing
> a crash in the way I'm using Glib::ListHandle: I get a segfault when I
> try to dereference a child of the returned listhandle with a
> "g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed" warning.
Cool, but you should patch the .ccg and .hg files instead.
> So hopefully you can easily spot what's wrong with the use of the
> container.
Yes. Glib::ListHandle objects are used to defer the actual type
conversion to the point where the contents are accessed, and the
resulting container type is known. So using std::list<> is wrong here,
you need to wrap the GList directly.
Unfortunately this is one of those situations where a special TypeTraits
class for GnomeVFSURI is required in order to be able to use the
Glib::*Handle classes. IIRC pangomm contains quite a lot of these
custom traits structs, maybe you could have a look there for
inspiration.
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]