After I've seen your and some other similar questions,
I've wrote a short doc + working example of this:

Hope it can be of help to anyone.

Yuval Kashtan

On Wed, May 14, 2014 at 2:22 PM, Yuval Kashtan <yuvalkashtan@gmail.com> wrote:
float should automagically work.
but more complex types can be mapped

for instance, I'm using the following (in my interface file):
%include <arrays_java.i>
%apply signed char [ANY] {unsigned char* imageBuf}

to map c char * to java byte[]

you can read more in the documentation:

Yuval Kashtan

On Wed, May 14, 2014 at 2:00 PM, Tomer Pollak <tomerpollak@gmail.com> wrote:
Hello everyone

i'd be glad if someone could answer or refer me to a guide regarding this question:
assume i have this native func in c:

bool doX(char* name, float* data);

The function gets pointer and fills it with data. I wish to call this function from java so i could get the modified data and be able to modify it again in java scope.
How do I do that with SWIG? it has support for that?

As far as i know java and c (native) has different memory addresses and there is no access from one to the other.
meaning - its not possible to access the parameters "name & "data" from java.

Thanks in advanced

"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
Swig-user mailing list