W
wikenfalk
Hi
I want to create a SV * which references CODE.
In c I would do
void *fptr {
int afunc(void);
return (void *) &afunc;
}
Now I would like to
SV *
fptr
CODE:
RETVAL = newRV_noinc( (SV *) &XS_fptr);
OUTPUT:
RETVAL
(ignore that the name of the function is probably not correct .. that
part I have sorted out.)
The problem is how to generate the correct RETVAL.
I cannot find this information in perlguts .. maybe because I don't
understand ..
/xb
I want to create a SV * which references CODE.
In c I would do
void *fptr {
int afunc(void);
return (void *) &afunc;
}
Now I would like to
SV *
fptr
CODE:
RETVAL = newRV_noinc( (SV *) &XS_fptr);
OUTPUT:
RETVAL
(ignore that the name of the function is probably not correct .. that
part I have sorted out.)
The problem is how to generate the correct RETVAL.
I cannot find this information in perlguts .. maybe because I don't
understand ..
/xb