On windows, there are data types that seem to get mapped strangely (well legacy crap). Perhaps JNAerator should reject
trying to convert them with some error message (or use some sort of intrinsic knowledge if ran on a windows platform to convert them over to an int or byte respectively). The APIs that have these somewhat weird data types seem not to
work properly unless the types match up.
typedef BOOL int; // http://msdn.microsoft.com/en-us/library/aa383751(v=vs.85).aspx
void foo(BOOL); // maybe map to void foo(int int1);
void foo2(bool); // maybe map to void foo (byte byte1);
gets converted to this:
JNAerator: fixed mapping of bool for JNA(erator) target runtime (issue …
Hi @johnny-tc ,
Thanks for your report.
I've fixed the mapping of C++ bool type to byte for JNA target runtime, although this will obviously only work for functions in extern "C" blocks (or with the exact Mangling annotation).