From b269edc857b8bcf53ac3451c35113ad996cadb62 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 11 Apr 2021 20:06:40 -0600 Subject: locale.c: Cache the current LC_CTYPE locale name This is now used as a cache of length 1 to avoid having to lookup up the UTF-8ness as often. This commit also skips doing S_newctype() if the new boss is the same as the old --- intrpvar.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intrpvar.h') diff --git a/intrpvar.h b/intrpvar.h index 4351870393..22c2d8a9ad 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -839,6 +839,12 @@ PERLVARI(I, underlying_numeric_obj, locale_t, NULL) PERLVARI(I, scratch_locale_obj, locale_t, 0) #endif +#ifdef USE_LOCALE_CTYPE + +PERLVARI(I, ctype_name, const char *, NULL) /* Name of current ctype locale */ + +# endif + /* Array of signal handlers, indexed by signal number, through which the C signal handler dispatches. */ PERLVAR(I, psig_ptr, SV **) -- cgit v1.2.1