summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-11-14 20:18:39 +0000
committerNicholas Clark <nick@ccl4.org>2009-11-15 08:21:57 +0000
commit73b81b142731b84cfdd5037cbef3bf9cf5ff3094 (patch)
treed19e78c79f73d4698d5e7a4b01338ed2f4441f59 /op.c
parent3291825f3fd927adacdb9c44790978a741046199 (diff)
downloadperl-73b81b142731b84cfdd5037cbef3bf9cf5ff3094.tar.gz
Convert pad_check_dup() to static linkage, and call it from Perl_pad_add_name().
Provide a flag option to Perl_pad_add_name(), pad_add_NO_DUP_CHECK, to supress the call.
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/op.c b/op.c
index 6052186002..93d78c9758 100644
--- a/op.c
+++ b/op.c
@@ -406,13 +406,10 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
}
}
- /* check for duplicate declaration */
- pad_check_dup(name, len, is_our ? pad_add_OUR : 0,
- (PL_curstash && !strEQ(name,"$_") ? PL_curstash : PL_defstash));
-
/* allocate a spare slot and store the name in that slot */
off = pad_add_name(name, len,
+ is_our ? pad_add_OUR :
PL_parser->in_my == KEY_state ? pad_add_STATE : 0,
PL_parser->in_my_stash,
(is_our