diff options
author | David Mitchell <davem@iabyn.com> | 2010-05-04 13:22:13 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-05-04 14:45:54 +0100 |
commit | 5afa72af5aa99c40932771ad390abf5ba229611b (patch) | |
tree | 51755a9bb47818b503103d7fdfad3ee9c23cac8a /mg.c | |
parent | c919e87379678094951ae4130a71bdc1938ccde1 (diff) | |
download | perl-5afa72af5aa99c40932771ad390abf5ba229611b.tar.gz |
make local @tied, %tied, untied
Fix for RT #7938, #7939: when localising an array or hash, don't make the
new aggregate tied.
The old behaviour of { local @tied; ... } was equivalent to:
{
my $saved = \@tied;
*tied = [];
tied(@tied) = tied(@$saved) # if tied() were an lvalue function
...
*tied = $saved;
}
This patch simply removes the 'tied(@tied) = ...' step
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -178,6 +178,7 @@ S_is_container_magic(const MAGIC *mg) case PERL_MAGIC_arylen_p: case PERL_MAGIC_rhash: case PERL_MAGIC_symtab: + case PERL_MAGIC_tied: /* treat as value, so 'local @tied' isn't tied */ return 0; default: return 1; |