Hi again!
I now encounter a char** function (expecting an array of Strings). I
tried to use String[ ] but it doesn't let me... Not even when using
byte[ ][ ] instead. How can I do that?
Also I noticed that when dealing with string returning functions (that
fill a byte array passed as parameter) I have to initialise the
receiving byte array to a correct size (where I would just put null with
an array of ints for example)... Is that normal behaviour? The problem
seems to come from bcopy :
An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb7ebaf66, pid=9598, tid=3085056912
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# Problematic frame:
# C [libc.so.6+0x6ef66] bcopy+0x96
And one last question : is it supported to deal with pointers to
variable-size structures ? I mean with a function that return an int but
accept a pointer to a variable-size structure which will be created by
the said function?
Thanks
Timothy Wall a écrit :
On May 31, 2007, at 3:29 PM, Simon BASLE wrote:
Thank you very much for that quick response ! :D
I wasn't sure that primitive arrays would be seamlessly translated to
type pointer arrays in c (like int *) but if that's the case then
wonderfull ;)
I'll try out the byte[] method for my string (I think that I can
construct a String from a null terminated byte array using toString
from Library right?)
Thank you again
Edralzar
Oh yeah, I forgot I already wrote that in Native.toString() :)