|
> You should declare your delegate static... Aha - I see. I've now declared a static delegate, and Vala now generates the following C code: typedef gint (*CompareFunc) (void* a, void* b); static void qsort (void* base, gsize count, gsize size, CompareFunc f); Unfortunately I still receive the same error message: top.c:41: error: conflicting types for ‘qsort’ /usr/include/stdlib.h:689: error: previous declaration of ‘qsort’ was here The problem seems to be that the library qsort expects a comparison function that takes const pointers: // in stdlib.h typedef int (*__compar_fn_t) (__const void *, __const void *); So, then: is there an attribute I can apply so that Vala will generate a function prototype with const? Or must I fall back on wrapping qsort() in a C function that's easier to call from Vala? thanks! adam Thomas Chust wrote: Adam Dingle schrieb: |