/* scope.c
*
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
+ * 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
SV * const osv = *sptr;
register SV * const sv = *sptr = newSV(0);
-#ifdef PERL_MAD
- /* FIXME for MAD - this is causing ext/Safe/t/safeops.t to abort. */
- if (PL_formfeed && sv == PL_formfeed)
- abort();
-#endif
-
if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) {
if (SvGMAGICAL(osv)) {
const bool oldtainted = PL_tainted;
{
dVAR;
SV ** const sptr = &GvSVn(gv);
-#ifdef PERL_MAD
- if (PL_formfeed && *sptr == PL_formfeed)
- abort();
-#endif
PL_localizing = 1;
SvGETMAGIC(*sptr);
PL_localizing = 0;
Perl_save_generic_svref(pTHX_ SV **sptr)
{
dVAR;
-#ifdef PERL_MAD
- if (PL_formfeed && *sptr == PL_formfeed)
- abort();
-#endif
SSCHECK(3);
SSPUSHPTR(sptr);
SSPUSHPTR(SvREFCNT_inc(*sptr));
dVAR;
register SV * const sv = newSVsv(item);
-#ifdef PERL_MAD
- if (PL_formfeed && item == PL_formfeed)
- abort();
-#endif
-
SSCHECK(3);
SSPUSHPTR(item); /* remember the pointer */
SSPUSHPTR(sv); /* remember the value */
}
void
+Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
+{
+ dVAR;
+ SSCHECK(3);
+ SSPUSHDPTR(f);
+ SSPUSHPTR(p);
+ SSPUSHINT(SAVEt_DESTRUCTOR);
+}
+
+void
Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
{
dVAR;
Perl_save_svref(pTHX_ SV **sptr)
{
dVAR;
-#ifdef PERL_MAD
- if (PL_formfeed && *sptr == PL_formfeed)
- abort();
-#endif
SvGETMAGIC(*sptr);
SSCHECK(3);
SSPUSHPTR(sptr);
sv = *(SV**)ptr;
DEBUG_S(PerlIO_printf(Perl_debug_log,
"restore svref: %p %p:%s -> %p:%s\n",
- ptr, sv, SvPEEK(sv), value, SvPEEK(value)));
+ (void*)ptr, (void*)sv, SvPEEK(sv),
+ (void*)value, SvPEEK(value)));
*(SV**)ptr = value;
SvREFCNT_dec(sv);
PL_localizing = 2;
Copy(state, &PL_reg_state, 1, struct re_save_state);
}
break;
+ case SAVEt_PARSER:
+ ptr = SSPOPPTR;
+ parser_free((yy_parser *) ptr);
+ break;
default:
Perl_croak(aTHX_ "panic: leave_scope inconsistency");
}