From 89f10ea127415c3f4a60148e61bf59ce7e7d2b31 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 26 Dec 2010 10:44:15 -0700 Subject: [PATCH] regexec.c: Replace duplicated code by its macro Replace two instances of code that is the same as that given by an already existing macro. --- regexec.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/regexec.c b/regexec.c index 3644302..cb5eb10 100644 --- a/regexec.c +++ b/regexec.c @@ -189,12 +189,7 @@ sayNO; \ if (utf8_target && UTF8_IS_CONTINUED(nextchr)) { \ if (!CAT2(PL_utf8_,CLASS)) { \ - bool ok; \ - ENTER; \ - save_re_context(); \ - ok=CAT2(is_utf8_,CLASS)((const U8*)STR); \ - assert(ok); \ - LEAVE; \ + LOAD_UTF8_CHARCLASS(CLASS, STR); \ } \ if (!(OP(scan) == NAME \ ? cBOOL(swash_fetch(CAT2(PL_utf8_,CLASS), (U8*)locinput, utf8_target)) \ @@ -233,12 +228,7 @@ sayNO; \ if (utf8_target && UTF8_IS_CONTINUED(nextchr)) { \ if (!CAT2(PL_utf8_,CLASS)) { \ - bool ok; \ - ENTER; \ - save_re_context(); \ - ok=CAT2(is_utf8_,CLASS)((const U8*)STR); \ - assert(ok); \ - LEAVE; \ + LOAD_UTF8_CHARCLASS(CLASS, STR); \ } \ if ((OP(scan) == NAME \ ? cBOOL(swash_fetch(CAT2(PL_utf8_,CLASS), (U8*)locinput, utf8_target)) \ -- 2.7.4