diff options
author | Larry Wall <larry@netlabs.com> | 1993-12-10 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1993-12-10 00:00:00 +0000 |
commit | ed6116ce9b9d13712ea252ee248b0400653db7f9 (patch) | |
tree | 348e8de37401fa4381f6bfe0989abef2e3b409e0 /doop.c | |
parent | 9bbf408117c16189b372e6657c9e5a15d01ea504 (diff) | |
download | perl-ed6116ce9b9d13712ea252ee248b0400653db7f9.tar.gz |
perl 5.0 alpha 5
[editor's note: the sparc executables have not been included,
and emacs backup files and other cruft such as patch backup files have
been removed. This was reconstructed from a tarball found on the
September 1994 InfoMagic CD]
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -421,8 +421,12 @@ register SV *sv; if (!sv) return; - if (SvREADONLY(sv)) - croak("Can't chop readonly value"); + if (SvTHINKFIRST(sv)) { + if (SvREADONLY(sv)) + croak("Can't chop readonly value"); + if (SvROK(sv)) + sv_unref(sv); + } if (SvTYPE(sv) == SVt_PVAV) { I32 max; SV **array = AvARRAY(sv); @@ -471,8 +475,12 @@ SV *right; register char *rc = SvPV(right, rightlen); register I32 len; - if (SvREADONLY(sv)) - croak("Can't do %s to readonly value", op_name[optype]); + if (SvTHINKFIRST(sv)) { + if (SvREADONLY(sv)) + croak("Can't do %s to readonly value", op_name[optype]); + if (SvROK(sv)) + sv_unref(sv); + } len = leftlen < rightlen ? leftlen : rightlen; if (SvTYPE(sv) < SVt_PV) sv_upgrade(sv, SVt_PV); |