bgiii has asked for the wisdom of the Perl Monks concerning the following question:
I don't intend to use the pointer in C, just pass it around as an opaque pointer.
My question is how to get this void * from C back into Perl so that I can access the contents of this hash reference. Now I can push simple stuff onto the stack, but what I need to be able to do is push this hash reference address on the stack such that when I call this Perl code via call_pv, I can access this perl function (for instance):
sub foo {
my ($href, $key) = @_;
print $href->{$key};
}
Thanks a bunch. This is a hard one to google for...
WGIII
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash ref to & from C
by dave_the_m (Monsignor) on Sep 10, 2005 at 13:06 UTC | |
|
Re: hash ref to & from C
by samtregar (Abbot) on Sep 10, 2005 at 20:00 UTC |