diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2002-05-29 08:27:18 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-30 13:43:28 +0000 |
commit | d87ebaca0a7869eb1e72242575d17e2a179b9882 (patch) | |
tree | aaa261dddfc988e6e761c38f365af83fc9e6f7f4 /pp_sys.c | |
parent | db471dffd46b39adba13c07a4541803d93241ece (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |