diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-04-03 06:59:37 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-04-03 06:59:37 +0000 |
commit | e336de0d01f30cc4061b6d6a00d11df30fc67cd3 (patch) | |
tree | 47af4eae88807f461d216a10701a0502a2373226 /sv.c | |
parent | dfb1c8b93631b1cf8c1d0d2295ffff2bf0f098a7 (diff) | |
download | perl-e336de0d01f30cc4061b6d6a00d11df30fc67cd3.tar.gz |
[win32] implement stack-of-stacks so that magic invocations don't
invalidate local stack pointer
p4raw-id: //depot/win32/perl@864
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1964,7 +1964,7 @@ sv_setsv(SV *dstr, register SV *sstr) SvFAKE_on(dstr); /* can coerce to non-glob */ } /* ahem, death to those who redefine active sort subs */ - else if (curstack == sortstack + else if (curstackinfo->si_type == SI_SORT && GvCV(dstr) && sortcop == CvSTART(GvCV(dstr))) croak("Can't redefine active sort subroutine %s", GvNAME(dstr)); @@ -2055,7 +2055,7 @@ sv_setsv(SV *dstr, register SV *sstr) { /* ahem, death to those who redefine * active sort subs */ - if (curstack == sortstack && + if (curstackinfo->si_type == SI_SORT && sortcop == CvSTART(cv)) croak( "Can't redefine active sort subroutine %s", @@ -2740,6 +2740,7 @@ sv_clear(register SV *sv) destructor = gv_fetchmethod(SvSTASH(sv), "DESTROY"); if (destructor) { ENTER; + PUSHSTACK(SI_DESTROY); SvRV(&ref) = SvREFCNT_inc(sv); EXTEND(SP, 2); PUSHMARK(SP); @@ -2748,6 +2749,7 @@ sv_clear(register SV *sv) perl_call_sv((SV*)GvCV(destructor), G_DISCARD|G_EVAL|G_KEEPERR); SvREFCNT(sv)--; + POPSTACK(); LEAVE; } } while (SvOBJECT(sv) && SvSTASH(sv) != stash); |