In XS, how do I turn a string that holds a variable name into its address, I want to do something like the following perl code:
our $var = 1;
print ${$main::{var}};
In XS, how do I turn a string that holds a variable name into its address, I want to do something like the following perl code:
our $var = 1;
print ${$main::{var}};
In perlguts, it says:
If you know the name of a scalar variable, you can get a pointer to its SV by using the following:
SV* get_sv("package::varname", FALSE);