diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-03-25 13:09:09 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-09-10 21:02:58 -0600 |
commit | 6f2d5cbcfe6275cad930b63e81bfd159b3964944 (patch) | |
tree | e0394a94a69d8e3922dffab69c5ea80399aef261 /regcomp.c | |
parent | c11b1469027c6226458c10ea61522ddcdbee226c (diff) | |
download | perl-6f2d5cbcfe6275cad930b63e81bfd159b3964944.tar.gz |
Use separate macros for byte vs uv Unicode
This removes a macro not yet even in a development release, and splits
its calls into two classes: those where the input is a byte; and those
where it can be any unsigned integer. The byte implementation avoids a
function call on EBCDIC platforms.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1792,7 +1792,7 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs if ( !UTF ) { /* store first byte of utf8 representation of variant codepoints */ - if (! NATIVE_IS_INVARIANT(uvc)) { + if (! UVCHR_IS_INVARIANT(uvc)) { TRIE_BITMAP_SET(trie, UTF8_TWO_BYTE_HI(uvc)); } } @@ -4976,7 +4976,7 @@ S_pat_upgrade_to_utf8(pTHX_ RExC_state_t * const pRExC_state, Newx(dst, *plen_p * 2 + 1, U8); while (s < *plen_p) { - if (NATIVE_IS_INVARIANT(src[s])) + if (NATIVE_BYTE_IS_INVARIANT(src[s])) dst[d] = src[s]; else { dst[d++] = UTF8_EIGHT_BIT_HI(src[s]); @@ -11186,7 +11186,7 @@ tryagain: * utf8. If we start to fold non-UTF patterns, be sure to * update join_exact() */ if (LOC && ender < 256) { - if (NATIVE_IS_INVARIANT(ender)) { + if (UVCHR_IS_INVARIANT(ender)) { *s = (U8) ender; foldlen = 1; } else { |