regexec.c: Replace duplicated code by its macro
authorKarl Williamson <public@khwilliamson.com>
Sun, 26 Dec 2010 17:44:15 +0000 (10:44 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 17 Jan 2011 02:13:23 +0000 (19:13 -0700)
Replace two instances of code that is the same as that given by an already
existing macro.

regexec.c

index 3644302..cb5eb10 100644 (file)
--- a/regexec.c
+++ b/regexec.c
                 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))  \
                 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))  \