#define PERL_ARGS_ASSERT_PERLLIO_OPEN_CLOEXEC \
assert(file)
+PERL_CALLCONV const char* Perl_setlocale(const int category, const char* locale);
PERL_CALLCONV void* Perl_Slab_Alloc(pTHX_ size_t sz)
__attribute__warn_unused_result__;
PERL_CALLCONV void Perl__force_out_malformed_utf8_message(pTHX_ const U8 *const p, const U8 * const e, const U32 flags, const bool die_here);
#define PERL_ARGS_ASSERT__FORCE_OUT_MALFORMED_UTF8_MESSAGE \
assert(p); assert(e)
+PERL_CALLCONV Size_t Perl__inverse_folds(pTHX_ const UV cp, unsigned int * first_folds_to, const unsigned int ** remaining_folds_to)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__INVERSE_FOLDS \
+ assert(first_folds_to); assert(remaining_folds_to)
+
PERL_CALLCONV bool Perl__is_in_locale_category(pTHX_ const bool compiling, const int category);
PERL_CALLCONV bool Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
__attribute__warn_unused_result__;
PERL_CALLCONV UV Perl__to_utf8_upper_flags(pTHX_ const U8 *p, const U8 *e, U8* ustrp, STRLEN *lenp, bool flags, const char * const file, const int line);
#define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS \
assert(p); assert(ustrp); assert(file)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE unsigned int S__variant_byte_number(PERL_UINTMAX_T word)
- __attribute__warn_unused_result__;
-#endif
-
PERL_CALLCONV void Perl__warn_problematic_locale(void);
PERL_CALLCONV_NO_RET void Perl_abort_execution(pTHX_ const char * const msg, const char * const name)
__attribute__noreturn__;
#define PERL_ARGS_ASSERT_AV_MAKE \
assert(strp)
+PERL_CALLCONV SV* Perl_av_nonelem(pTHX_ AV *av, SSize_t ix);
+#define PERL_ARGS_ASSERT_AV_NONELEM \
+ assert(av)
PERL_CALLCONV SV* Perl_av_pop(pTHX_ AV *av);
#define PERL_ARGS_ASSERT_AV_POP \
assert(av)
PERL_CALLCONV void Perl_init_debugger(pTHX);
PERL_CALLCONV int Perl_init_i18nl10n(pTHX_ int printwarn);
PERL_CALLCONV int Perl_init_i18nl14n(pTHX_ int printwarn);
+PERL_CALLCONV void Perl_init_named_cv(pTHX_ CV *cv, OP *nameop);
+#define PERL_ARGS_ASSERT_INIT_NAMED_CV \
+ assert(cv); assert(nameop)
PERL_CALLCONV void Perl_init_stacks(pTHX);
PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm);
#define PERL_ARGS_ASSERT_INIT_TM \
#endif
#ifndef NO_MATHOMS
-PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep);
+PERL_CALLCONV bool Perl_is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep);
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC \
assert(s); assert(ep)
#endif
PERL_CALLCONV int Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg);
#define PERL_ARGS_ASSERT_MAGIC_SETNKEYS \
assert(sv); assert(mg)
+PERL_CALLCONV int Perl_magic_setnonelem(pTHX_ SV* sv, MAGIC* mg);
+#define PERL_ARGS_ASSERT_MAGIC_SETNONELEM \
+ assert(sv); assert(mg)
PERL_CALLCONV int Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg);
#define PERL_ARGS_ASSERT_MAGIC_SETPACK \
assert(sv); assert(mg)
PERL_CALLCONV CV * Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags);
#define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS \
assert(subaddr)
-PERL_CALLCONV void Perl_new_numeric(pTHX_ const char* newcoll);
PERL_CALLCONV PERL_SI* Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
__attribute__warn_unused_result__;
PERL_CALLCONV void Perl_setfd_cloexec_or_inhexec_by_sysfdness(pTHX_ int fd);
PERL_CALLCONV void Perl_setfd_inhexec(int fd);
PERL_CALLCONV void Perl_setfd_inhexec_for_sysfd(pTHX_ int fd);
-PERL_CALLCONV char* Perl_setlocale(int category, const char* locale);
PERL_CALLCONV HEK* Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
#define PERL_ARGS_ASSERT_SHARE_HEK \
assert(str)
#define PERL_ARGS_ASSERT_SWASH_INIT \
assert(pkg); assert(name); assert(listsv)
-PERL_CALLCONV void Perl_sync_locale(pTHX);
+PERL_CALLCONV void Perl_switch_to_global_locale(void);
+PERL_CALLCONV bool Perl_sync_locale(void);
PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv);
#define PERL_ARGS_ASSERT_SYS_INIT \
assert(argc); assert(argv)
PERL_CALLCONV void Perl_taint_proper(pTHX_ const char* f, const char *const s);
#define PERL_ARGS_ASSERT_TAINT_PROPER \
assert(s)
+PERL_CALLCONV void Perl_thread_locale_init(void);
+PERL_CALLCONV void Perl_thread_locale_term(void);
PERL_CALLCONV OP * Perl_tied_method(pTHX_ SV *methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...);
#define PERL_ARGS_ASSERT_TIED_METHOD \
assert(methname); assert(sp); assert(sv); assert(mg)
assert(idop)
/* PERL_CALLCONV U8* uvchr_to_utf8(pTHX_ U8 *d, UV uv); */
/* PERL_CALLCONV U8* uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */
+/* PERL_CALLCONV U8* uvchr_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, UV flags, HV ** msgs); */
PERL_CALLCONV U8* Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, const UV flags);
#define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS \
assert(d)
+PERL_CALLCONV U8* Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, const UV flags, HV** msgs);
+#define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS_MSGS \
+ assert(d)
PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
#define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \
assert(d)
assert(sv); assert(mg)
#endif
+#if !defined(EBCDIC)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned int S__variant_byte_number(PERL_UINTMAX_T word)
+ __attribute__warn_unused_result__;
+#endif
+
+#endif
#if !defined(HAS_GETENV_LEN)
PERL_CALLCONV char* Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len);
#define PERL_ARGS_ASSERT_GETENV_LEN \
#endif
#endif
#if defined(PERL_CORE) || defined(PERL_EXT)
-PERL_CALLCONV bool Perl_isSCRIPT_RUN(pTHX_ const U8 *s, const U8 *send, const bool utf8_target, SCX_enum * ret_script)
+PERL_CALLCONV bool Perl_isSCRIPT_RUN(pTHX_ const U8 *s, const U8 *send, const bool utf8_target)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_ISSCRIPT_RUN \
assert(s); assert(send)
#endif
#if defined(PERL_IN_LOCALE_C)
STATIC const char* S_category_name(const int category);
+STATIC void S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset);
+PERL_STATIC_INLINE const char * S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset)
+ __attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_SAVE_TO_BUFFER \
- assert(string); assert(buf_size)
+ assert(buf_size)
#endif
+
+STATIC const char* S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
# if defined(USE_LOCALE)
STATIC void S_new_collate(pTHX_ const char* newcoll);
STATIC void S_new_ctype(pTHX_ const char* newctype);
#define PERL_ARGS_ASSERT_NEW_CTYPE \
assert(newctype)
+STATIC void S_new_numeric(pTHX_ const char* newnum);
STATIC void S_set_numeric_radix(pTHX_ const bool use_locale);
STATIC char* S_stdize_locale(pTHX_ char* locs);
#define PERL_ARGS_ASSERT_STDIZE_LOCALE \
assert(locs)
+# if defined(USE_POSIX_2008_LOCALE)
+STATIC const char* S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid);
+# endif
# if defined(WIN32)
STATIC char* S_win32_setlocale(pTHX_ int category, const char* locale);
# endif
PERL_CALLCONV SV* Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale, SV **output_invlist);
#define PERL_ARGS_ASSERT__GET_REGCLASS_NONBITMAP_DATA \
assert(node)
-PERL_CALLCONV void Perl__load_PL_utf8_foldclosures(pTHX);
PERL_CALLCONV int Perl_re_printf(pTHX_ const char *fmt, ...);
#define PERL_ARGS_ASSERT_RE_PRINTF \
assert(fmt)
#define PERL_ARGS_ASSERT_REGPROP \
assert(sv); assert(o)
#endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)
PERL_CALLCONV SV* Perl__get_swash_invlist(pTHX_ SV* const swash)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT__GET_SWASH_INVLIST \
#define PERL_ARGS_ASSERT__INVLIST_SEARCH \
assert(invlist)
-PERL_CALLCONV HV* Perl__swash_inversion_hash(pTHX_ SV* const swash)
- __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \
- assert(swash)
-
#ifndef PERL_NO_INLINE_FUNCTIONS
PERL_STATIC_INLINE bool* S_get_invlist_offset_addr(SV* invlist)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_FIND_NEXT_ASCII \
assert(s); assert(send)
-STATIC char * S_find_next_masked(char * s, const char * send, const U8 byte, const U8 mask)
+STATIC U8 * S_find_next_masked(U8 * s, const U8 * send, const U8 byte, const U8 mask)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_FIND_NEXT_MASKED \
assert(s); assert(send)
#define PERL_ARGS_ASSERT_FIND_NEXT_NON_ASCII \
assert(s); assert(send)
-STATIC char * S_find_span_end(char* s, const char * send, const char span_byte)
+STATIC U8 * S_find_span_end(U8* s, const U8 * send, const U8 span_byte)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_FIND_SPAN_END \
assert(s); assert(send)
#define PERL_ARGS_ASSERT_FIND_SPAN_END_MASK \
assert(s); assert(send)
-STATIC bool S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character)
+STATIC bool S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character, const U8* e)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_ISFOO_UTF8_LC \
- assert(character)
+ assert(character); assert(e)
STATIC bool S_isGCB(pTHX_ const GCB_enum before, const GCB_enum after, const U8 * const strbeg, const U8 * const curpos, const bool utf8_target)
__attribute__warn_unused_result__;
assert(stash); assert(name)
#endif
#if defined(PERL_IN_UTF8_C)
-STATIC UV S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special);
+STATIC UV S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp, SV *invlist, const int * const invmap, const unsigned int * const * const aux_tables, const U8 * const aux_table_lengths, const char * const normal);
#define PERL_ARGS_ASSERT__TO_UTF8_CASE \
- assert(p); assert(ustrp); assert(swashp); assert(normal)
+ assert(p); assert(ustrp); assert(invlist); assert(invmap); assert(normal)
STATIC U32 S_check_and_deprecate(pTHX_ const U8 * p, const U8 ** e, const unsigned type, const bool use_locale, const char * const file, const unsigned line);
#define PERL_ARGS_ASSERT_CHECK_AND_DEPRECATE \
assert(p); assert(e); assert(file)
PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_IS_UTF8_COMMON \
- assert(p); assert(swash); assert(swashname)
+ assert(p); assert(swashname)
#endif
#ifndef PERL_NO_INLINE_FUNCTIONS
PERL_STATIC_INLINE bool S_is_utf8_common_with_len(pTHX_ const U8 *const p, const U8 *const e, SV **swash, const char * const swashname, SV* const invlist)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_IS_UTF8_COMMON_WITH_LEN \
- assert(p); assert(e); assert(swash); assert(swashname)
+ assert(p); assert(e); assert(swashname)
#endif
#ifndef PERL_NO_INLINE_FUNCTIONS
assert(s)
#endif
+STATIC HV * S_new_msg_hv(pTHX_ const char * const message, U32 categories, U32 flag)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEW_MSG_HV \
+ assert(message)
+
STATIC U8* S_swash_scan_list_line(pTHX_ U8* l, U8* const lend, UV* min, UV* max, UV* val, const bool wants_value, const U8* const typestr)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_SWASH_SCAN_LIST_LINE \
assert(p); assert(lenp)
#endif
#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags);
+PERL_CALLCONV UV Perl__to_fold_latin1(const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags);
#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1 \
assert(p); assert(lenp)
#endif
assert(param)
#endif
-#if defined(USE_LOCALE) && ( defined(PERL_IN_LOCALE_C) || defined(PERL_IN_MG_C) || defined (PERL_EXT_POSIX))
+#if defined(USE_LOCALE) && ( defined(PERL_IN_LOCALE_C) || defined(PERL_IN_MG_C) || defined (PERL_EXT_POSIX) || defined (PERL_EXT_LANGINFO))
PERL_CALLCONV bool Perl__is_cur_LC_category_utf8(pTHX_ int category);
#endif
#if defined(USE_LOCALE_COLLATE)