L
Lyes Amazouz
[Note: parts of this message were removed to make it a legal post.]
Hello list,
I have written a function which prototype is:
FILE * getContent (void * objetc, char * code);
This function a FILE * to a temporary file it fill with user data, and copy
in "code" (with strcpy) some string
I warpedd this function with Swig, but when I call it from a Ruby script, I
have two problems:
1- The class of the function output in Ruby is <SWIG::TYPE_p_FILE>, what is
this class? I looked for it in the net by without results, Hows can I
recover the data from my temporary file with this?
2- when I call this function from a C program, the variable code will
contain a string value that the function copy to it from an other variable
in internal. and with a C program, the content of the variable code is
updated very well. But when I call the wrapped function from a Ruby script,
the argument code stays empty (empty string "")? How have to give this
argument in such way that it will be modified?
thank you
Hello list,
I have written a function which prototype is:
FILE * getContent (void * objetc, char * code);
This function a FILE * to a temporary file it fill with user data, and copy
in "code" (with strcpy) some string
I warpedd this function with Swig, but when I call it from a Ruby script, I
have two problems:
1- The class of the function output in Ruby is <SWIG::TYPE_p_FILE>, what is
this class? I looked for it in the net by without results, Hows can I
recover the data from my temporary file with this?
2- when I call this function from a C program, the variable code will
contain a string value that the function copy to it from an other variable
in internal. and with a C program, the content of the variable code is
updated very well. But when I call the wrapped function from a Ruby script,
the argument code stays empty (empty string "")? How have to give this
argument in such way that it will be modified?
thank you