diff options
author | Karl Williamson <khw@cpan.org> | 2020-03-04 19:58:33 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-03-11 09:00:03 -0600 |
commit | 619d7873ba993b76544e98af9079c5f8a4b90886 (patch) | |
tree | 75989d034d32f9f968dc1f66e841a36a71736243 /regcomp.h | |
parent | da35f4caf751e91609a937f0c03c0efa1c608091 (diff) | |
download | perl-619d7873ba993b76544e98af9079c5f8a4b90886.tar.gz |
regcomp.h: Combine two macros into one
One of these macros is no longer used, so just combine them.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1101,21 +1101,22 @@ re.pm, especially to the documentation. if (DEBUG_v_TEST || RE_DEBUG_FLAG(RE_DEBUG_EXTRA_DUMP_PRE_OPTIMIZE)) x ) /* initialization */ -/* get_sv() can return NULL during global destruction. */ -#define GET_RE_DEBUG_FLAGS DEBUG_r({ \ - SV * re_debug_flags_sv = NULL; \ - re_debug_flags_sv = PL_curcop ? get_sv(RE_DEBUG_FLAGS, GV_ADD) : NULL; \ - if (re_debug_flags_sv) { \ - if (!SvIOK(re_debug_flags_sv)) \ - sv_setuv(re_debug_flags_sv, RE_DEBUG_COMPILE_DUMP | RE_DEBUG_EXECUTE_MASK ); \ - re_debug_flags=SvIV(re_debug_flags_sv); \ - }\ -}) - #ifdef DEBUGGING -#define DECLARE_AND_GET_RE_DEBUG_FLAGS volatile IV re_debug_flags = 0; \ - PERL_UNUSED_VAR(re_debug_flags); GET_RE_DEBUG_FLAGS; +#define DECLARE_AND_GET_RE_DEBUG_FLAGS \ + volatile IV re_debug_flags = 0; PERL_UNUSED_VAR(re_debug_flags); \ + STMT_START { \ + SV * re_debug_flags_sv = NULL; \ + /* get_sv() can return NULL during global destruction. */ \ + re_debug_flags_sv = PL_curcop ? get_sv(RE_DEBUG_FLAGS, GV_ADD) : NULL; \ + if (re_debug_flags_sv) { \ + if (!SvIOK(re_debug_flags_sv)) /* If doesnt exist set to default */\ + sv_setuv(re_debug_flags_sv, \ + /* These defaults should be kept in sync with re.pm */ \ + RE_DEBUG_COMPILE_DUMP | RE_DEBUG_EXECUTE_MASK ); \ + re_debug_flags=SvIV(re_debug_flags_sv); \ + } \ + } STMT_END #define isDEBUG_WILDCARD (DEBUG_v_TEST || RE_DEBUG_FLAG(RE_DEBUG_EXTRA_WILDCARD)) |