Re: [Vala] sqlite needs more love



So...the arguments are not shifted...but i don't know where they are :)

I saw the problem here...it's about the c conversion of string[] which is not 
converted to char**...it is "int n, char **".

Vala code:

  public static int foo(pointer data, int ncols, string[] values, string[] colnames) {
    ...
  }

Generated C code:

  gint foo_bar_foo(gpointer data, gint ncols, int values_length1, char **values, int column_names_length1, 
char **column_names)
    ...
  }

And the one defined in sqlite3.h

  typedef int (*sqlite3_callback)(void *, int, char **, char **);

Can this be defined as a Vala attribute in the vapi? or should the valac be fixed to
handle arrays in this way?

--pancake



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