Re: [Vala] Seg fault when trying to pass args to gtk_init_check.



Hi Tal,

On Mon, 2012-07-16 at 18:02 +0300, Tal Hadad wrote:
    int* argsc;
    char*** argsv;
    argsv = Max.get_args (out argsc);

If argsv is supposed to represent a string array, Max.get_args() has
been bound incorrectly. Use string[] if you mean string array - or
char** if you have to use raw pointers but char*** is most likely wrong
here. The correct binding is probably something like:

        public static string[] get_args ();

extern bool gtk_init_check (int *argc, char ***argv);

This binding is not ideal. I recommend you to use Gtk.init_check() from
the GTK+ bindings shipped with Vala.

        Gtk.init_check (ref args);

Regards,
Jürg




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