Skip to content

Commit 5d6c2ab

Browse files
committed
fixups
1 parent 8a7ef04 commit 5d6c2ab

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

locale.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,8 +2198,8 @@ S_querylocale_2008_i(pTHX_ const locale_category_index index,
21982198
# define QUERYLOCALE_LOCK
21992199
# define QUERYLOCALE_UNLOCK
22002200
# else
2201-
# define QUERYLOCALE_LOCK GENxLCr_LOCK
2202-
# define QUERYLOCALE_UNLOCK GENxLCr_UNLOCK
2201+
# define QUERYLOCALE_LOCK PERL_GENx_LCr_LOCK(0)
2202+
# define QUERYLOCALE_UNLOCK PERL_GENx_LCr_UNLOCK(0)
22032203
# endif
22042204

22052205
/* Finally, everything is ready, so here is the 'else' clause to implement
@@ -5916,10 +5916,10 @@ S_populate_hash_from_localeconv(pTHX_ HV * hv,
59165916
# define LOCALECONV_UNLOCK
59175917
# else
59185918

5919-
GENxLCr_LOCK;
5919+
PERL_GENx_LCr_LOCK(0);
59205920

59215921
# undef LOCALECONV_UNLOCK
5922-
# define LOCALECONV_UNLOCK GENxLCr_UNLOCK
5922+
# define LOCALECONV_UNLOCK PERL_GENx_LCr_UNLOCK(0)
59235923
# endif
59245924
# if ! defined(TS_W32_BROKEN_LOCALECONV) || ! defined(USE_THREAD_SAFE_LOCALE)
59255925
# define WIN32_TEARDOWN
@@ -6541,9 +6541,9 @@ S_langinfo_sv_i(pTHX_
65416541
{
65426542
/* An ugly API; only the first byte of the returned char* address means
65436543
* anything */
6544-
NL_LANGINFO_LOCK;
6544+
PERL_NL_LANGINFO_LOCK;
65456545
char char_value = nl_langinfo(item)[0];
6546-
NL_LANGINFO_UNLOCK;
6546+
PERL_NL_LANGINFO_UNLOCK;
65476547

65486548
sv_setuv(sv, char_value);
65496549
}
@@ -6574,9 +6574,9 @@ S_langinfo_sv_i(pTHX_
65746574

65756575
{ /* A slightly less ugly API; the int portion of the returned char*
65766576
* address is an integer. */
6577-
NL_LANGINFO_LOCK;
6577+
PERL_NL_LANGINFO_LOCK;
65786578
int int_value = (int) PTR2UV(nl_langinfo(item));
6579-
NL_LANGINFO_UNLOCK;
6579+
PERL_NL_LANGINFO_UNLOCK;
65806580

65816581
sv_setuv(sv, int_value);
65826582
}
@@ -6605,7 +6605,7 @@ S_langinfo_sv_i(pTHX_
66056605

66066606
/* The rest of the possibilities deliver a true char* pointer to a
66076607
* string (or sequence of strings in the case of ALT_DIGITS) */
6608-
NL_LANGINFO_LOCK;
6608+
PERL_NL_LANGINFO_LOCK;
66096609

66106610
retval = nl_langinfo(item);
66116611
Size_t total_len = strlen(retval);
@@ -6651,7 +6651,7 @@ S_langinfo_sv_i(pTHX_
66516651
strtod("1,5", NULL),
66526652
strtod("1.5", NULL)
66536653
);
6654-
NL_LANGINFO_UNLOCK;
6654+
PERL_NL_LANGINFO_UNLOCK;
66556655
locale_panic_(msg);
66566656
}
66576657

@@ -6719,7 +6719,7 @@ S_langinfo_sv_i(pTHX_
67196719
byte_dump_string_((U8 *) retval,
67206720
total_len, 0),
67216721
locale);
6722-
NL_LANGINFO_UNLOCK;
6722+
PERL_NL_LANGINFO_UNLOCK;
67236723
locale_panic_(msg);
67246724
}
67256725
else {
@@ -6748,7 +6748,7 @@ S_langinfo_sv_i(pTHX_
67486748

67496749
sv_setpvn(sv, retval, total_len);
67506750

6751-
NL_LANGINFO_UNLOCK;
6751+
PERL_NL_LANGINFO_UNLOCK;
67526752

67536753
/* Convert the ALT_DIGITS separator to a semi-colon if not already */
67546754
if (UNLIKELY(item == ALT_DIGITS) && total_len > 0 && separator != ';') {
@@ -9092,7 +9092,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
90929092
# endif
90939093
# if ! defined(PERL_LC_ALL_USES_NAME_VALUE_PAIRS) && defined(LC_ALL)
90949094

9095-
GENxLCr_LOCK;
9095+
PERL_GENx_LCr_LOCK(0);
90969096

90979097
/* If we haven't done so already, translate the LC_ALL positions of
90989098
* categories into our internal indices. */
@@ -9128,25 +9128,25 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
91289128

91299129
}
91309130

9131-
GENxLCr_UNLOCK;
9131+
PERL_GENx_LCr_UNLOCK(0);
91329132

91339133
# endif
91349134
# ifdef USE_POSIX_2008_LOCALE
91359135

91369136
/* This is a global, so be sure to keep another instance from zapping it */
9137-
GENxLCr_LOCK;
9137+
PERL_GENx_LCr_LOCK(0);
91389138
if (PL_C_locale_obj) {
9139-
GENxLCr_UNLOCK;
9139+
PERL_GENx_LCr_UNLOCK(0);
91409140
}
91419141
else {
91429142
PERL_NEWLOCALE_LOCK;
91439143
PL_C_locale_obj = newlocale(LC_ALL_MASK, "C", (locale_t) 0);
91449144
PERL_NEWLOCALE_UNLOCK;
91459145
if (! PL_C_locale_obj) {
9146-
GENxLCr_UNLOCK;
9146+
PERL_GENx_LCr_UNLOCK(0);
91479147
locale_panic_("Cannot create POSIX 2008 C locale object");
91489148
}
9149-
GENxLCr_UNLOCK;
9149+
PERL_GENx_LCr_UNLOCK(0);
91509150

91519151
DEBUG_Lv(PerlIO_printf(Perl_debug_log, "created C object %p\n",
91529152
PL_C_locale_obj));

0 commit comments

Comments
 (0)