summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-11-08 21:51:07 -0700
committerKarl Williamson <public@khwilliamson.com>2011-11-08 22:38:38 -0700
commit3a4c58c9c509b78969231f9f65f289c227188c3f (patch)
tree5202ae806607733ff6aa9926ead070b097b08fb2 /proto.h
parent968c5e6ab01546e5aa0c2cb7fbb1c06a7c99b6af (diff)
downloadperl-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 2b58991d26..7f9621a47e 100644
--- a/proto.h
+++ b/proto.h
@@ -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);