mugwumpjism has asked for the wisdom of the Perl Monks concerning the following question:
I'm creating an RV with newRV:
HV* stash = SvSTASH(*el_iter); SV* el = newRV(*el_iter); /* if (HV_AMAGIC(stash)) */ SvAMAGIC_on(el); sv_2mortal(el);
However, the created RVs are missing the overload flag.
I need some way of auto-setting the flag - presumably I can do this by looking at the stash and seeing if it has the AMAGIC flag set, but when I uncomment the commented out test, I get this compile error:
Object.xs: In function `XS_Set__Object_members': Object.xs:408: `SVpgv_AM' undeclared (first use in this function) Object.xs:408: (Each undeclared identifier is reported only once Object.xs:408: for each function it appears in.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Auto-setting the OVERLOAD flag in an XS routine
by mugwumpjism (Hermit) on May 17, 2002 at 15:25 UTC |