Varargs issue with LDC

Steven Schveighoffer schveiguy at gmail.com
Wed Jan 31 17:54:56 UTC 2024


On Wednesday, 31 January 2024 at 17:16:51 UTC, Don Allen wrote:

> The called gtk function has this prototype, which I believe is 
> correct:
> ````
> extern (C) GtkListStore* gtk_list_store_new (gint n_columns, 
> ...);
> ````

Here is what gtkd defines:

https://github.com/gtkd-developers/GtkD/blob/17d7dc25e1adc9b86aff381b950f21706118ebeb/generated/gtkd/gtk/c/functions.d#L7467

> The call site looks like
> ````
>         writefln("debug: %d",  NMktStore.num_cols);
>         store = gtk_list_store_new(NMktStore.num_cols,
>                 g_type_string, // date
>                 g_type_string, // num
>                 g_type_string, // description
>                 g_type_boolean, // r
>                 g_type_string, // transaction guid
>                 g_type_string, // value
>                 g_type_string); // balance
> ````
> The debugging writefln prints "debug: 7", which is correct.

I'm assuming gint is int? Did you validate that the type 
constants are correct? Double check against gtkd.

It doesn't seem to be anything with this call on first glance.

-Steve


More information about the Digitalmars-d mailing list