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:
http://www.swig.org/Doc2.0/Java.html#Java_pointers



Sincerely,
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
Tomer


------------------------------------------------------------------------------
"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."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Swig-user mailing list
Swig-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user