summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2023-04-05 12:26:26 -0600
committerKarl Williamson <khw@cpan.org>2023-04-18 09:12:50 -0600
commit9e254b0b5b145c9bfc3053e778e9f7fbb3760b45 (patch)
tree0f4c0e36ab0a4bff10a549e0f4d199d8dc77784d /perl.h
parentce8b32d4fca69ba96e2f7679c3b9fbdf183a35e0 (diff)
downloadperl-9e254b0b5b145c9bfc3053e778e9f7fbb3760b45.tar.gz
PERL_SET_LOCALE_CONTEXT: Actually do something
This is a macro that does a quick check before calling a function to actually do the work. The sense of that check was reversed. The check is repeated in the function, but this time correctly. The bottom line was if the function should be called, the macro failed to call it. If it shouldn't be called the macro would call it, but the check in the function caused it to return without doing anything. Hence this whole thing was a no-op. However, I cant get things to fail without this patch. ISTR this was the result of a BBC, with another one likely affected, but I can't find them now.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index 4ef161db95..1257a55951 100644
--- a/perl.h
+++ b/perl.h
@@ -6365,7 +6365,7 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[];
#ifdef USE_PERL_SWITCH_LOCALE_CONTEXT
# define PERL_SET_LOCALE_CONTEXT(i) \
STMT_START { \
- if (UNLIKELY(PL_veto_switch_non_tTHX_context)) \
+ if (LIKELY(! PL_veto_switch_non_tTHX_context)) \
Perl_switch_locale_context(); \
} STMT_END
#else