summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2002-05-29 08:27:18 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-30 13:43:28 +0000
commitd87ebaca0a7869eb1e72242575d17e2a179b9882 (patch)
treeaaa261dddfc988e6e761c38f365af83fc9e6f7f4 /pp_sys.c
parentdb471dffd46b39adba13c07a4541803d93241ece (diff)
downloadperl-d87ebaca0a7869eb1e72242575d17e2a179b9882.tar.gz
Re: perl@16861
Message-ID: <GXV98gzkgW7Y092yn@efn.org> Yitzchak won't give up on self-ties. p4raw-id: //depot/perl@16885
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index c199cf7842..200ed94831 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -828,11 +828,11 @@ PP(pp_tie)
sv_unmagic(varsv, how);
/* Croak if a self-tie on an aggregate is attempted. */
if (varsv == SvRV(sv) &&
- (SvTYPE(sv) == SVt_PVAV ||
- SvTYPE(sv) == SVt_PVHV))
+ (SvTYPE(varsv) == SVt_PVAV ||
+ SvTYPE(varsv) == SVt_PVHV))
Perl_croak(aTHX_
"Self-ties of arrays and hashes are not supported");
- sv_magic(varsv, sv, how, Nullch, 0);
+ sv_magic(varsv, (SvRV(sv) == varsv ? Nullsv : sv), how, Nullch, 0);
}
LEAVE;
SP = PL_stack_base + markoff;