diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-11-08 21:51:07 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-11-08 22:38:38 -0700 |
commit | 3a4c58c9c509b78969231f9f65f289c227188c3f (patch) | |
tree | 5202ae806607733ff6aa9926ead070b097b08fb2 /proto.h | |
parent | 968c5e6ab01546e5aa0c2cb7fbb1c06a7c99b6af (diff) | |
download | perl-3a4c58c9c509b78969231f9f65f289c227188c3f.tar.gz |
utf8.c: Faster latin1 upper/title casing
This creates a new function to handle upper/title casing code points in
the latin1 range, and avoids using a swash to compute the case. This is
because the correct values are compiled-in.
And it calls this function when appropriate for both title and upper
casing, in both utf8 and uni forms,
Unlike the similar function for lower casing, it may make sense for this function to be
called from outside utf8.c, but inside the core, so it is not static,
but its name begins with an underscore.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -6983,6 +6983,12 @@ STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U #endif #if defined(PERL_IN_UTF8_C) +PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1 \ + assert(p); assert(lenp) + STATIC STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len) __attribute__warn_unused_result__ __attribute__nonnull__(1); |