[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: Re: Wrapping of C structs
From: Murray Cumming <murrayc () murrayc ! com>
Date: 2008-06-09 8:02:57
Message-ID: 1212998577.6826.16.camel () murrayc-desktop
[Download RAW message or body]
On Thu, 2008-06-05 at 16:36 +0200, Johannes Schmid wrote:
> Hi!
>
> I am currently working on wrapping libgda-4.0 but I ran into some
> problems as libgda-4.0 uses some simple C structures (not
> GObject-derived) for storing data.
>
> For example:
>
> typedef struct {
> gchar *table_name;
> gint size;
> gchar **column_names;
> GValue **column_values;
> } GdaMetaContext;
>
> Currently I just typedef those to match the C++ namespace but maybe there is a better solution.
It depends how it is used in the C API. Some possibilities:
- It's used just once or twice as a way to provide input parameters to a
function. Maybe you can avoid wrapping the function, or can reimplement
it.
- It's used in API that is not really public anyway. Maybe you can
ignore it.
- It's used lots, meaning that there's probably already
initialization/copy/free functions. It should probably be a real
registered boxed-type in the C API.
--
murrayc@murrayc.com
www.murrayc.com
www.openismus.com
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic