I have a perl object (blessed reference to hash) like this.
sub funcname {
#some code
}
my $o = My::Class->new();
$o->{internal_data} = \&funcname; #I know it is not nice
At other place somewhere in XS code where I have $o reference I need to get the value of $o->{internal_data}
.
/* at some point in XS code */
SV *obj = ... /* $o value passed to a XS function */
SV *func;
...
/* here I do not know how to load $o->{internal_data} value into func */
...
call_sv(func,G_SCALAR);
There is perhaps some chapter in perl(api|xstut|guts|???). I just was not able to find it.
Thanks in advance for any hint.
-- kmx