On 08/03/12 15:00, colin gray wrote:
> Hello,
>
> When reading the SWIG documentation for Java, I see examples on how to
> pass an array from Java to a C function using the %array_functions(char,
> chararray), but I don't understand how to create an array in my Java
> client from a C function returning a char array using SWIG.
>
> Secondly, why does SWIG generate a newchararray that returns a String,
> shouldn't it be a char[]? See generated code below:
>
What it should return cannot be deduced by purely returning the type, so
an assumption is made that it is a string. That is documented and the
idea is to customise it if you don't like the default behaviour. Look at
arrays_java.i for some more ideas on array handling.
William
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Swig-user mailing list
Swig...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swig-user