summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-02 10:00:35 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-02 10:24:00 +0100
commitd15cd8313063e5745ca7fc7b7b5dc3d73def2e68 (patch)
tree582092f867d1814659ac6c7ea4990cdcb3f10c5c /gv.c
parent23f6cb285656c85849665669b0a13828f0d8b395 (diff)
downloadperl-d15cd8313063e5745ca7fc7b7b5dc3d73def2e68.tar.gz
Move variable declaration without initialisation at the top
Plus a comment by Nicholas
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index d64965d509..b662563898 100644
--- a/gv.c
+++ b/gv.c
@@ -1863,11 +1863,12 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
else if ( lex_mask && SvPOK(lex_mask) ) {
/* we have an entry in the hints hash, check if method has been
* masked by overloading.pm */
+ STRLEN len;
const int offset = method / 8;
const int bit = method % 7;
- STRLEN len;
char *pv = SvPV(lex_mask, len);
+ /* Bit set, so this overloading operator is disabled */
if ( (STRLEN)offset <= len && pv[offset] & ( 1 << bit ) )
return NULL;
}