Skip to content

Commit 14c8abe

Browse files
author
John Peacock
committed
Just take what is currently in core as gospel
1 parent c803fda commit 14c8abe

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

vutil/vutil.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,32 @@ const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char**
255255
#define UNLOCK_NUMERIC_STANDARD()
256256
#endif
257257

258+
#ifndef LOCK_LC_NUMERIC_STANDARD
259+
/* Lock/unlock to the C locale until unlock is called. This needs to be
260+
* recursively callable. [perl #128207] */
261+
# define LOCK_LC_NUMERIC_STANDARD() \
262+
STMT_START { \
263+
DEBUG_Lv(PerlIO_printf(Perl_debug_log, \
264+
"%s: %d: lock lc_numeric_standard: new depth=%d\n", \
265+
__FILE__, __LINE__, PL_numeric_standard + 1)); \
266+
__ASSERT_(PL_numeric_standard) \
267+
PL_numeric_standard++; \
268+
} STMT_END
269+
#endif
270+
271+
#ifndef UNLOCK_LC_NUMERIC_STANDARD
272+
# define UNLOCK_LC_NUMERIC_STANDARD() \
273+
STMT_START { \
274+
if (PL_numeric_standard > 1) { \
275+
PL_numeric_standard--; \
276+
} \
277+
else { \
278+
assert(0); \
279+
} \
280+
DEBUG_Lv(PerlIO_printf(Perl_debug_log, \
281+
"%s: %d: lc_numeric_standard decrement lock, new depth=%d\n", \
282+
__FILE__, __LINE__, PL_numeric_standard)); \
283+
} STMT_END
284+
#endif
285+
258286
/* ex: set ro: */

0 commit comments

Comments
 (0)