diff options
author | Graham Barr <gbarr@pobox.com> | 1998-10-24 07:45:21 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-25 08:37:49 +0000 |
commit | b23a5f78ac194f96460ff70d7f7de145efd51801 (patch) | |
tree | 24a23d75b93648488e4732bbdc0d91e0a6a8ef19 | |
parent | e0587a03b6ac758d47dfaaf71fafbe8f164a1bd5 (diff) | |
download | perl-b23a5f78ac194f96460ff70d7f7de145efd51801.tar.gz |
Re: Auto-incrementing tied scalar causes SEGV
Message-ID: <19981024124521.C512@pobox.com>
p4raw-id: //depot/perl@2076
-rw-r--r-- | sv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3596,6 +3596,8 @@ sv_inc(register SV *sv) if (!sv) return; + if (SvGMAGICAL(sv)) + mg_get(sv); if (SvTHINKFIRST(sv)) { if (SvREADONLY(sv)) { dTHR; @@ -3612,8 +3614,6 @@ sv_inc(register SV *sv) sv_setiv(sv, i); } } - if (SvGMAGICAL(sv)) - mg_get(sv); flags = SvFLAGS(sv); if (flags & SVp_NOK) { (void)SvNOK_only(sv); @@ -3690,6 +3690,8 @@ sv_dec(register SV *sv) if (!sv) return; + if (SvGMAGICAL(sv)) + mg_get(sv); if (SvTHINKFIRST(sv)) { if (SvREADONLY(sv)) { dTHR; @@ -3706,8 +3708,6 @@ sv_dec(register SV *sv) sv_setiv(sv, i); } } - if (SvGMAGICAL(sv)) - mg_get(sv); flags = SvFLAGS(sv); if (flags & SVp_NOK) { SvNVX(sv) -= 1.0; |