Re: Wrapping gboolean list[] for Glib::KeyFile
- From: Murray Cumming <murrayc murrayc com>
- To: rob page <page rob gmail com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Wrapping gboolean list[] for Glib::KeyFile
- Date: Thu, 16 Feb 2006 22:56:51 +0100
On Thu, 2006-02-16 at 20:54 +0000, rob page wrote:
> 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?
Yes, please use bool, and never use gboolean in public API. Is there an
actual problem with the conversion in this case?
> 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.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]