Re: [Vala] how to call extern function expecting function pointer?
- From: Thomas Chust <chust web de>
- To: Adam Dingle <adam medovina org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] how to call extern function expecting function pointer?
- Date: Tue, 09 Dec 2008 20:55:34 +0100
Adam Dingle schrieb:
[...]
So: is there some attribute I can apply to the extern declaration that
will cause Vala to generate a compatible function prototype? Or should I
instead write some C code to wrap qsort() into a C function which Vala
can call more easily? Thanks for any advice -
[...]
You should declare your delegate static, since qsort doesn't allow you
to pass a closure pointer through to the compare function. The signature
of the delegate function type and the qsort function declaration
generated by Vala should then be compatible with the C library.
cu,
Thomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]