nativelibs4java / JNAerator

JNAerator: native bindings generator for JNA / BridJ / Node.js

Home Page:http://jnaerator.googlecode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong conversion of union

dhoehmann opened this issue · comments

this typedef

typedef union
{
char szFormula[NAO_LENGTH_FORMULA]; /* Formula /
char szURL[NAO_LENGTH_URL]; /
URL /
DBHANDLE hDb; /
Database /
NOTEHANDLE hNote; /
Note /
NOTELINK nlNoteLink; /
Link */
} NAO_ENTRY_RESOURCE;

gets this constructor:

/**
* @param szFormula_or_szURL Formula

* C type : char[2048], or URL

* C type : char[512]
*/
public NAO_ENTRY_RESOURCE(byte szFormula_or_szURL[]) {
super();
if ((szFormula_or_szURL.length != this.szFormula_or_szURL.length))
throw new IllegalArgumentException("Wrong array size !");
this.szURL = this.szFormula = szFormula_or_szURL;
setType(byte[].class);
}

and that can't be compiled