in reply to Re^2: XS: exposing C++ library constant as package variable
in thread XS: exposing C++ library constant as package variable
Address 0x18 is not stack'd, malloc'd or (recently) free'd
That suggests that get_sv() is returning an invalid SV*; which it shouldn't, if the docs are to be believed:
get_sv Returns the SV of the specified Perl scalar. flags are passed to gv_fe +tchpv. If GV_ADD is set and the Perl variable does not exist then it +will be created. If flags is zero and the variable does not exist the +n NULL is returned. NOTE: the perl_ form of this function is deprecated. SV* get_sv(const char *name, I32 flags)
I think your only course of action (other than sticking with the way you have that works) is to write a minimal testcase and raise a perlbug.
P5p will either: correct the code; or correct my interpretation of the docs.
Of course, any resolution will take time, so you'll probably need to stick with what you originally had for now anyway. Sorry for the bum steer.
|
|---|