Wrapping gboolean list[] for Glib::KeyFile



Hi All,

I'm currently writing a wrapper for Glib::KeyFile, as per this bug:

http://bugzilla.gnome.org/show_bug.cgi?id=330535

It is mostly done, but on trying to wrap get_boolean_list, i'm
required to wrap a variable of type gboolean [].  I can convert this
to a Glib::ArrayHandle<gboolean> with
Glib::ArrayHandle<gboolean>(bool_list, length_of_list,
Glib::OWNERSHIP_DEEP), however it seems most other glibmm/gtkmm stuff
uses bool instead of gboolean (possibly due to gboolean just being a
typedef'ed gint and so wastes resources?).

Anyway, I was just wondering what the *correct* way to wrap this was?
Also, I'm probably going to have to convert the other way too, ie:
from Glib::ArrayHandle<bool> to gboolean* ...and I presume I'll have a
similar problem when I do that. So help with either of these would be
appreciated.

Rob.



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