summaryrefslogtreecommitdiffstats
path: root/Modules/_sre.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-05-05 05:53:40 (GMT)
committerGitHub <noreply@github.com>2017-05-05 05:53:40 (GMT)
commit898ff03e1e7925ecde3da66327d3cdc7e07625ba (patch)
tree977fc4b98c0e85816348cebd3b12026407c368b6 /Modules/_sre.c
parent647c3d381e67490e82cdbbe6c96e46d5e1628ce2 (diff)
downloadcpython-898ff03e1e7925ecde3da66327d3cdc7e07625ba.zip
cpython-898ff03e1e7925ecde3da66327d3cdc7e07625ba.tar.gz
cpython-898ff03e1e7925ecde3da66327d3cdc7e07625ba.tar.bz2
bpo-30215: Make re.compile() locale agnostic. (#1361)
Compiled regular expression objects with the re.LOCALE flag no longer depend on the locale at compile time. Only the locale at matching time affects the result of matching.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r--Modules/_sre.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 03a138e..afb2bce 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -1588,6 +1588,8 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
case SRE_OP_NOT_LITERAL:
case SRE_OP_LITERAL_IGNORE:
case SRE_OP_NOT_LITERAL_IGNORE:
+ case SRE_OP_LITERAL_LOC_IGNORE:
+ case SRE_OP_NOT_LITERAL_LOC_IGNORE:
GET_ARG;
/* The arg is just a character, nothing to check */
break;
@@ -1625,6 +1627,7 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
case SRE_OP_IN:
case SRE_OP_IN_IGNORE:
+ case SRE_OP_IN_LOC_IGNORE:
GET_SKIP;
/* Stop 1 before the end; we check the FAILURE below */
if (!_validate_charset(code, code+skip-2))