Revision history for Variable-Magic
+0.17 2008-05-11 09:05 UTC
+ + Fix : 5.8.4 and lower don't have mPUSHi. Gah. Yeah, I know, I should
+ use Devel::PPPort.
+
0.16 2008-05-10 22:05 UTC
+ Add : The samples/copy.pl script.
+ Chg : The sv_magical() + vmg_mg_magical() combo was simplified into
# define SvMAGIC_set(sv, val) (SvMAGIC(sv) = (val))
#endif
+#ifndef mPUSHi
+# define mPUSHi(I) PUSHs(sv_2mortal(newSViv(I)))
+#endif
+
#ifndef dMY_CXT
# define MY_CXT vmg_globaldata
# define dMY_CXT
#if VMG_UVAR
-/* Bug-free mg_magical - see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00036.html, but specialized to our needs. */
+/* Bug-free mg_magical - see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00036.html - but specialized to our needs. */
STATIC void vmg_sv_magicuvar(pTHX_ SV *sv, const char *uf, I32 len) {
#define vmg_sv_magicuvar(S, U, L) vmg_sv_magicuvar(aTHX_ (S), (U), (L))
const MAGIC* mg;
do {
const MGVTBL* const vtbl = mg->mg_virtual;
if (vtbl) {
-/*
- if (vtbl->svt_get && !(mg->mg_flags & MGf_GSKIP))
- SvGMAGICAL_on(sv);
- if (vtbl->svt_set)
- SvSMAGICAL_on(sv);
-*/
if (vtbl->svt_clear) {
SvRMAGICAL_on(sv);
break;
}
}
} while ((mg = mg->mg_moremagic));
-/*
- if (!(SvFLAGS(sv) & (SVs_GMG|SVs_SMG)))
- SvRMAGICAL_on(sv);
-*/
}
}