diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-12-31 21:02:59 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-12-31 21:02:59 +0000 |
commit | 392db708ea3e6ba973f656d139373678acbb4e63 (patch) | |
tree | 635452d1da897a285c5b3e4a86d7c90b0319a421 /gv.c | |
parent | 18ea00d7a2aca8b645ef7f054dd0117de27dfe0b (diff) | |
download | perl-392db708ea3e6ba973f656d139373678acbb4e63.tar.gz |
Because name is always NUL terminated we can incorporate length
0 names in the switch statement for length 1.
p4raw-id: //depot/perl@23719
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -952,8 +952,9 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) } } } - } else if (len == 1) { - /* Names of length 1. */ + } else { + /* Names of length 1. (Or 0. But name is NUL terminated, so that will + be case '\0' in this switch statement (ie a default case) */ switch (*name) { case '&': case '`': |