summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-03-25 13:09:09 -0600
committerKarl Williamson <public@khwilliamson.com>2013-09-10 21:02:58 -0600
commit6f2d5cbcfe6275cad930b63e81bfd159b3964944 (patch)
treee0394a94a69d8e3922dffab69c5ea80399aef261 /regcomp.c
parentc11b1469027c6226458c10ea61522ddcdbee226c (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 3e6ec29346..10b1aa3bf4 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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 {