From: Michal Nazarewicz <mina86@mina86.com>
To: 24020@debbugs.gnu.org
Subject: bug#24020: [PATCH] Fix ‘is multibyte’ test regex.c’s mutually_exclusive_p (bug#24020)
Date: Wed, 27 Jul 2016 18:22:17 +0200 [thread overview]
Message-ID: <1469636537-17036-1-git-send-email-mina86@mina86.com> (raw)
In-Reply-To: <1468850684-17867-1-git-send-email-mina86@mina86.com>
* src/regex.c (mutually_exclusive_p): Fix how whether character is
unibyte is tested when calling execute_charset function. This bug has
been introduced by [6dc6b00: Fix ‘[[:cc:]]*literal’ regex failing to
match ‘literal’] which dropped a call to IS_REAL_ASCII (c) macro.
Reinstitute it.
---
src/regex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
FYI, I’ve just submitted this patch. The bug has been caught by
tests from dima_regex_embedded_modifiers branch which I’m working on
pulling into master branch so they will come in another commits.
diff --git a/src/regex.c b/src/regex.c
index 297bf71..1f2a1f08 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4767,7 +4767,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const_re_char *p1,
else if ((re_opcode_t) *p1 == charset
|| (re_opcode_t) *p1 == charset_not)
{
- if (!execute_charset (&p1, c, c, !multibyte))
+ if (!execute_charset (&p1, c, c, !multibyte || IS_REAL_ASCII (c)))
{
DEBUG_PRINT (" No match => fast loop.\n");
return 1;
--
2.8.0.rc3.226.g39d4020
prev parent reply other threads:[~2016-07-27 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 14:04 bug#24020: [PATCH] Fix ‘[[:word:]]*\u2620’ failing to match ‘foo\u2620’ Michal Nazarewicz
2016-07-18 15:03 ` Eli Zaretskii
2016-07-18 18:07 ` Michal Nazarewicz
2016-07-18 23:30 ` bug#24020: [PATCHv2] Fix ‘[[:word:]]*\u2620’ failing to match ‘foo\u2620’ (bug#24020) Michal Nazarewicz
2016-07-19 8:00 ` Andreas Schwab
2016-07-20 12:36 ` Michal Nazarewicz
2016-07-25 21:54 ` Michal Nazarewicz
2016-07-27 16:22 ` Michal Nazarewicz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469636537-17036-1-git-send-email-mina86@mina86.com \
--to=mina86@mina86.com \
--cc=24020@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.