(compile_pattern): Check the multibyteness of cached
authorKenichi Handa <handa@m17n.org>
Fri, 8 Sep 2000 00:46:53 +0000 (00:46 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 8 Sep 2000 00:46:53 +0000 (00:46 +0000)
string and PATTERN.

src/search.c

index 246f9cb..3ba413a 100644 (file)
@@ -221,6 +221,7 @@ compile_pattern (pattern, regp, translate, posix, multibyte)
       if (NILP (cp->regexp))
        goto compile_it;
       if (XSTRING (cp->regexp)->size == XSTRING (pattern)->size
+         && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
          && !NILP (Fstring_equal (cp->regexp, pattern))
          && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
          && cp->posix == posix