Still fooling around with weak reference stashes.  How do I protect
something
from Inline's implied destructors?

Here is my code


use Inline C => <<END_C;

SV *it_pointer;

SV* it(){
        SV *itp;
        itp = it_pointer;
        return itp;
};

SV* setit(SV* thisit){
        it_pointer = thisit;
        return it_pointer;
};


int seven(){
        return 7;
};


END_C


chomp($arg = <>);
print "testing $arg:\n";

setit($arg);

print seven, it, "\n";
print "Still $arg\n";

END OF MY CODE




Running this gives 

$ echo bloop | perl -I /usr/local/lib/site_perl ./it.pm 
testing bloop:
7
Attempt to free unreferenced scalar at ./it.pm line 85, <> line 1.
Still 


-- 
                                           David Nicol 816.235.1187
                                      Signature closed for repaving

Reply via email to