diff options
author | Rickard Green <[email protected]> | 2017-04-11 15:05:51 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-04-11 15:05:51 +0200 |
commit | 92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9 (patch) | |
tree | 133119634987a6eeede055d644fe2f999ea3d318 /erts/emulator/pcre/pcre_maketables.c | |
parent | b66834310f1d3f30a7b4d5c02753053d3f9d7ef8 (diff) | |
parent | 6520f78d4b878ff66adcf8d25de331d8ad06dd1d (diff) | |
download | otp-92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9.tar.gz otp-92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9.tar.bz2 otp-92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9.zip |
Merge branch 'rickard/pcre-8.40'
OTP-14331
* rickard/pcre-8.40:
Update documentation
Update README.pcre_update.md
Stack guard for PCRE
Adjust for incompatibility between PCRE 8.40 and perl 5.22.1
Generate re replacement and split tests with perl vsn 5.22.1
Fix re_SUITE:pcre_compile_workspace_overflow/1
Skip line with lockout of modifiers in PCRE tests
Update tests for PCRE version 8.40
Update PCRE to version 8.40
Conflicts:
erts/emulator/beam/beam_debug.c
Diffstat (limited to 'erts/emulator/pcre/pcre_maketables.c')
-rw-r--r-- | erts/emulator/pcre/pcre_maketables.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/erts/emulator/pcre/pcre_maketables.c b/erts/emulator/pcre/pcre_maketables.c index 9310d886fa..89204d1152 100644 --- a/erts/emulator/pcre/pcre_maketables.c +++ b/erts/emulator/pcre/pcre_maketables.c @@ -104,13 +104,17 @@ for (i = 0; i < 256; i++) *p++ = tolower(i); for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i); /* Then the character class tables. Don't try to be clever and save effort on -exclusive ones - in some locales things may be different. Note that the table -for "space" includes everything "isspace" gives, including VT in the default -locale. This makes it work for the POSIX class [:space:]. Note also that it is -possible for a character to be alnum or alpha without being lower or upper, -such as "male and female ordinals" (\xAA and \xBA) in the fr_FR locale (at -least under Debian Linux's locales as of 12/2005). So we must test for alnum -specially. */ +exclusive ones - in some locales things may be different. + +Note that the table for "space" includes everything "isspace" gives, including +VT in the default locale. This makes it work for the POSIX class [:space:]. +From release 8.34 is is also correct for Perl space, because Perl added VT at +release 5.18. + +Note also that it is possible for a character to be alnum or alpha without +being lower or upper, such as "male and female ordinals" (\xAA and \xBA) in the +fr_FR locale (at least under Debian Linux's locales as of 12/2005). So we must +test for alnum specially. */ memset(p, 0, cbit_length); for (i = 0; i < 256; i++) @@ -129,14 +133,15 @@ for (i = 0; i < 256; i++) } p += cbit_length; -/* Finally, the character type table. In this, we exclude VT from the white -space chars, because Perl doesn't recognize it as such for \s and for comments -within regexes. */ +/* Finally, the character type table. In this, we used to exclude VT from the +white space chars, because Perl didn't recognize it as such for \s and for +comments within regexes. However, Perl changed at release 5.18, so PCRE changed +at release 8.34. */ for (i = 0; i < 256; i++) { int x = 0; - if (i != CHAR_VT && isspace(i)) x += ctype_space; + if (isspace(i)) x += ctype_space; if (isalpha(i)) x += ctype_letter; if (isdigit(i)) x += ctype_digit; if (isxdigit(i)) x += ctype_xdigit; |