[Vala] VAPI-Bindings to obscure c-types.
- From: Daniel Brendle <grindhold skarphed org>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] VAPI-Bindings to obscure c-types.
- Date: Mon, 5 Dec 2016 08:53:14 +0100
Hi there.
First of all, sorry for the bad subject-line, but I'm really missing the
words to describe this in a concise manner.
As some of you know, I am playing with writing a GLib wrapper for
libode6. I've come across another problem that I don't think has been
documented on this mailinglist or elsewhere yet:
In libode's code, there is a type called dReal. Depending on some
compiler flags, dReal might be a double or a float:
#if defined(dSINGLE)
typedef float dReal;
#ifdef dDOUBLE
#error You can only #define dSINGLE or dDOUBLE, not both.
#endif /* dDOUBLE */
#elif defined(dDOUBLE)
typedef double dReal;
#else
#error You must #define dSINGLE or dDOUBLE
#endif
The library then uses dReal in various method signatures that I have to
bind against. Is there any possibility to cover this in vala? I can
never know which distribution sets libode's compiler flags in which way,
so I fear my VAPI would break on some systems.
Help's very appreciated.
Yours, Grindhold
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]