Skip to content

Commit 4ee6fa1

Browse files
committed
Generalize tr/// compilation to work under EBCDIC
This changes to use a symbolic constant that is valid on any platform, instead of a numeric value that isn't valid on EBCDIC platforms. The value for this symbolic constant is unchanged on ASCII platforms, which means this commit doesn't change any compiled code, so that it can go into 5.42.
1 parent a7c61e7 commit 4ee6fa1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

op.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6410,9 +6410,9 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
64106410
UV PL_partition_by_byte_length[] = {
64116411
0,
64126412

6413-
/* 0 .. 127 all have 1 byte
6413+
/* 0 .. 127 (0.. 159 on EBCDIC platforms) all have 1 byte
64146414
* representations */
6415-
0x80,
6415+
UTF_MIN_CONTINUATION_BYTE,
64166416

64176417
/* The highest two UTF-8 byte representable code point is the one with
64186418
* all 1's in the payload bearing bits of the start byte and its single

0 commit comments

Comments
 (0)