This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fewer strEQ calls in toke.c:S_new_constant
authorFather Chrysostomos <sprout@cpan.org>
Thu, 6 Dec 2012 02:27:18 +0000 (18:27 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 9 Dec 2012 02:44:27 +0000 (18:44 -0800)
commitf374c70f2f466935df480e5b2a9b1853fd86aa9d
tree7e905021d1d1b478520825d562fa19a50d0fe817
parent34213185c286738af0d6c7a97ef3ef00228d3a43
Fewer strEQ calls in toke.c:S_new_constant

There is a small fixed number of keys that can be passed to this
static function:

charnames
binary
float
integer
q
qr

In a few places, we check whether the key is "charnames".  It would
be quicker just to check the first character, since, if it is 'c', the
key must be "charnames".  (Under debugging builds, assert that that
assumption is true.)
toke.c