INIT("1");
EXTCONST char PL_No[]
INIT("");
+EXTCONST char PL_Zero[]
+ INIT("0");
EXTCONST char PL_hexdigit[]
INIT("0123456789abcdef0123456789ABCDEF");
#ifdef USE_LOCALE
/* These locale things are all subject to change */
+# if defined(USE_ITHREADS) \
+ && defined(HAS_NEWLOCALE) \
+ && defined(LC_ALL_MASK) \
+ && defined(HAS_FREELOCALE) \
+ && defined(HAS_USELOCALE) \
+ && ! defined(NO_THREAD_SAFE_USELOCALE)
+
+ /* The code is written for simplicity to assume that any platform advanced
+ * enough to have the Posix 2008 locale functions has LC_ALL. The test
+ * above makes sure that assumption is valid */
+
+# define USE_THREAD_SAFE_LOCALE
+# endif
+
# define LOCALE_INIT MUTEX_INIT(&PL_locale_mutex)
# ifdef USE_THREAD_SAFE_LOCALE
PL_C_locale_obj = (locale_t) NULL; \
} \
} STMT_END
- }
# else
# define LOCALE_TERM MUTEX_DESTROY(&PL_locale_mutex)
# endif
# define _CHECK_AND_WARN_PROBLEMATIC_LOCALE \
STMT_START { \
if (UNLIKELY(PL_warn_locale)) { \
- _warn_problematic_locale(); \
+ Perl__warn_problematic_locale(); \
} \
} STMT_END
# else
# endif /* PERL_CORE or PERL_IN_XSUB_RE */
-#if defined(USE_ITHREADS) \
- && defined(HAS_NEWLOCALE) \
- && defined(LC_ALL_MASK) \
- && defined(HAS_FREELOCALE) \
- && defined(HAS_USELOCALE) \
- && ! defined(NO_THREAD_SAFE_USELOCALE)
-
- /* The code is written for simplicity to assume that any platform advanced
- * enough to have the Posix 2008 locale functions has LC_ALL. The test
- * above makes sure that assumption is valid */
-
-# define USE_THREAD_SAFE_LOCALE
-#endif
-
#else /* No locale usage */
# define LOCALE_INIT
# define LOCALE_TERM
#define STORE_LC_NUMERIC_SET_TO_NEEDED() \
if (IN_LC(LC_NUMERIC)) { \
if (_NOT_IN_NUMERIC_UNDERLYING) { \
- set_numeric_local(); \
+ Perl_set_numeric_local(aTHX); \
_restore_LC_NUMERIC_function = &Perl_set_numeric_standard; \
} \
} \
/* The next two macros set unconditionally. These should be rarely used, and
* only after being sure that this is what is needed */
#define SET_NUMERIC_STANDARD() \
- STMT_START { if (_NOT_IN_NUMERIC_STANDARD) set_numeric_standard(); \
- } STMT_END
+ STMT_START { if (_NOT_IN_NUMERIC_STANDARD) \
+ Perl_set_numeric_standard(aTHX); \
+ } STMT_END
#define SET_NUMERIC_UNDERLYING() \
STMT_START { if (_NOT_IN_NUMERIC_UNDERLYING) \
- set_numeric_local(); } STMT_END
+ Perl_set_numeric_local(aTHX); } STMT_END
/* The rest of these LC_NUMERIC macros toggle to one or the other state, with
* the RESTORE_foo ones called to switch back, but only if need be */
#define STORE_LC_NUMERIC_UNDERLYING_SET_STANDARD() \
bool _was_local = _NOT_IN_NUMERIC_STANDARD; \
- if (_was_local) set_numeric_standard();
+ if (_was_local) Perl_set_numeric_standard(aTHX);
/* Doesn't change to underlying locale unless within the scope of some form of
* 'use locale'. This is the usual desired behavior. */
#define STORE_LC_NUMERIC_STANDARD_SET_UNDERLYING() \
bool _was_standard = _NOT_IN_NUMERIC_UNDERLYING \
&& IN_LC(LC_NUMERIC); \
- if (_was_standard) set_numeric_local();
+ if (_was_standard) Perl_set_numeric_local(aTHX);
/* Rarely, we want to change to the underlying locale even outside of 'use
* locale'. This is principally in the POSIX:: functions */
#define STORE_LC_NUMERIC_FORCE_TO_UNDERLYING() \
if (_NOT_IN_NUMERIC_UNDERLYING) { \
- set_numeric_local(); \
+ Perl_set_numeric_local(aTHX); \
_restore_LC_NUMERIC_function = &Perl_set_numeric_standard; \
}
} STMT_END
#define RESTORE_LC_NUMERIC_UNDERLYING() \
- if (_was_local) set_numeric_local();
+ if (_was_local) Perl_set_numeric_local(aTHX);
#define RESTORE_LC_NUMERIC_STANDARD() \
if (_restore_LC_NUMERIC_function) { \