regexec.c: Remove redundant code
authorKarl Williamson <public@khwilliamson.com>
Fri, 1 Feb 2013 04:08:09 +0000 (21:08 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 1 Feb 2013 04:50:58 +0000 (21:50 -0700)
This code does a save_re_context() and then calls swash_init, which also
does a save_re_context.  This is unnecessary; the save should be done in
the lowest possible level.

regexec.c

index fc078cf..ec6886a 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -141,10 +141,8 @@ static const char* const non_utf8_target_but_utf8_required
 #define LOAD_UTF8_CHARCLASS(swash_ptr, property_name) STMT_START {            \
         if (!swash_ptr) {                                                     \
             U8 flags = _CORE_SWASH_INIT_ACCEPT_INVLIST;                       \
-            ENTER; save_re_context();                                         \
             swash_ptr = _core_swash_init("utf8", property_name, &PL_sv_undef, \
                                          1, 0, NULL, &flags);                 \
-            LEAVE;                                                            \
             assert(swash_ptr);                                                \
         }                                                                     \
     } STMT_END