Skip to content

Commit 7c1ecce

Browse files
committed
utf8n_to_uvchr_msgs: Change declaration type and move
Move closer to its first use. This variable only needs to be 8 bits, but tell the compiler to prioritize speed over size.
1 parent 25b3bcb commit 7c1ecce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

inline.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,6 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
29982998

29992999
const U8 * const s0 = s;
30003000
const U8 * send = s0 + curlen;
3001-
UV type;
30023001
UV uv;
30033002

30043003
PERL_ARGS_ASSERT_UTF8N_TO_UVCHR_MSGS;
@@ -3035,7 +3034,7 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
30353034
return *s;
30363035
}
30373036

3038-
type = PL_strict_utf8_dfa_tab[*s];
3037+
PERL_UINT_FAST8_T type = PL_strict_utf8_dfa_tab[*s];
30393038

30403039
UV state = PL_strict_utf8_dfa_tab[256 + type];
30413040
uv = (0xff >> type) & NATIVE_UTF8_TO_I8(*s);

0 commit comments

Comments
 (0)