in reply to From a Blessing to a Curse

Congrats on contributing to the core!

If others want to use this in their own Perl programs now, they could use Inline:

use Inline C => <<EOF; int curse( SV *obj ) { if (SvOBJECT(SvRV(obj))) { SvOBJECT_off(SvRV(obj)); SvSTASH(SvRV(obj)) = NULL; return 1; } return 0; } EOF my $a = bless {}, 'A'; print ref($a), "\n"; curse($a); print ref($a), "\n";

update: added clarification and congrats

Replies are listed 'Best First'.
Re: Re: From a Blessing to a Curse
by japhy (Canon) on Jul 15, 2001 at 02:02 UTC
    Yes, yes, I know I could have used Inline here, but all the rest of the Perl-in-C code for the core is currently written using XS, so I figured I should. It was a simple enough task.

    japhy -- Perl and Regex Hacker