Skip to content

Commit 9e254b0

Browse files
committed
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.
1 parent ce8b32d commit 9e254b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6365,7 +6365,7 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[];
63656365
#ifdef USE_PERL_SWITCH_LOCALE_CONTEXT
63666366
# define PERL_SET_LOCALE_CONTEXT(i) \
63676367
STMT_START { \
6368-
if (UNLIKELY(PL_veto_switch_non_tTHX_context)) \
6368+
if (LIKELY(! PL_veto_switch_non_tTHX_context)) \
63696369
Perl_switch_locale_context(); \
63706370
} STMT_END
63716371
#else

0 commit comments

Comments
 (0)