Also sprach Sisyphus:
> Sisyphus wrote:
>
>>
>> use warnings;
>> use Inline C => Config =>
>> BUILD_NOISY => 1; # to make sure we get to
>> # see compiler warnings
>>
>> use Inline C => <<'END_OF_C_CODE';
>>
>> void set_undef(SV * a) {
>>
>> sv_setsv(a, &PL_sv_undef);
>
> Another thread, and another list - and it has just been drawn to my
> attention that's not the right way to assign PL_sv_undef to an SV. The
> above line should be replaced by:
>
> a = &PL_sv_undef
Wont help either. You cannot change 'a' in-place thusly. If you want
that you'd have to have something like:
void set_undef (SV **a) {
*a = &PL_sv_undef;
}
But I don't think that Inline::C or XS know about an SV** prototype. The
reason is again the difference between changing a C-structure internally
(this is what sv_setsv does) or having a variable point to something
else. If you want to do the latter, you need to pass the pointer by
reference. These are the usual C-semantics.
>> if(a == &PL_sv_undef)
>> printf("A valid means of testing for &PL_sv_undef\n");
>>
>> else printf("An INVALID means of testing for &PL_sv_undef\n");
>>
>> }
>>
>
> I haven't tested, but I expect one would then find that the script
> reports "A valid means of testing for &PL_sv_undef".
Only if the variable passed to set_undef() was a real PL_sv_undef in the
first place.

What you are thinking of is a no-op.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus}) !JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexi ixesixeseg;y~\n~~dddd;eval