[Gtk-sharp-list] ListStore/TreeStore.SetColumnTypes

Mike Kestner mkestner@ximian.com
07 Oct 2002 23:58:45 -0500

On Thu, 2002-10-03 at 14:52, Vladimir Vukicevic wrote:

> void gtk_list_store_set_column_types
>   (GtkListStore *list_store, gint n_columns, GType *types);

> i.e., the types parameter is losing it's pointer/array-ness.  What's
> the proper way to fix this?

Non-trivial.  Right now, the code generator indescriminitely discards
*'s which works okay for simple pass-by-ref parameters, but clearly this
is a situation where that falls down.

In order to automatically handle the *-means-array-of-refs scenario, we
will most likely need to mark the individual parameters with an
attribute in the metadata stage of the parser and then implement a
(de)marshaling mechanism in the code generator.

If there are a lot of similar function parameters, it makes sense to
implement this type of solution.  If not, it may be more appropriate to
suppress the automatic generation of these methods and handwrap them in
a .custom file.

Mike Kestner <mkestner@ximian.com>