nativelibs4java / JNAerator

JNAerator: native bindings generator for JNA / BridJ / Node.js
http://jnaerator.googlecode.com
504 stars 108 forks source link

Wrong conversion of union #98

Open dhoehmann opened 8 years ago

dhoehmann commented 8 years ago

this typedef

typedef union { char szFormula[NAO_LENGTHFORMULA]; /* Formula / char szURL[NAO_LENGTHURL]; / 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