Hello,
I'm using Inline::C to wrap a c api for use in perl. I've successfully
wrapped some functions using the SV* perl type for the parameter types
but I would like to use a typemap file so that I can use the typedef'ed
types from the API. The problem I have is that the OUTPUT section of
the typemap file doesn't seem to be getting executed.
I have working:
long my_LL_ValueAlloc(SV* value) {
int tmpValue;
long rval = LL_ValueAlloc(&tmpValue);
sv_setiv(value, tmpValue);
return rval;
}
I would like to have:
LLSTATUS my_LL_ValueAlloc(LLVALUE value) {
long rval = LL_ValueAlloc(&value);
return rval;
}
My typemap file:
LLSTATUS T_IV
LLLONG T_IV
#LLVALUE T_IV
#LLVALUE T_PTR
LLVALUE MY_IV
##############################################
INPUT
MY_IV
$var = ($type)5;
##############################################
OUTPUT
MY_IV
sv_setiv($arg, (IV)5);
The input section seems to be working because I when I print the value
of the input parameter it is always 5, but when I check the value of the
input parameter from the perl code it is never changed. Am I missing
something in the configuration? Any help is greatly appreciated.
Thanks
Lloyd Thompson