summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-06-27 22:01:53 -0600
committerKarl Williamson <khw@cpan.org>2018-07-05 14:47:19 -0600
commit67049a5ffa8b7757041edb8f972a0a74fbe5d63d (patch)
tree7427d4c3d7a9b99d58a33e86647478916343871d /proto.h
parente6a4ffc3f7aa69cbf3e5e83518e40e529a34b75b (diff)
downloadperl-67049a5ffa8b7757041edb8f972a0a74fbe5d63d.tar.gz
Make isSTRICT_UTF8_CHAR() an inline function
It was a macro that used a trie. This changes to use the dfa constructed in previous commits. I didn't bother with taking measurements. A dfa should have fewer conditionals for many code points.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index c9d47ff420..72233609f5 100644
--- a/proto.h
+++ b/proto.h
@@ -1407,6 +1407,13 @@ PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, GV *gv, bool not_implicit, bool w
#define PERL_ARGS_ASSERT_IO_CLOSE \
assert(io)
#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE Size_t S_isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_ISSTRICT_UTF8_CHAR \
+ assert(s0); assert(e)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
PERL_STATIC_INLINE Size_t S_isUTF8_CHAR(const U8 * const s0, const U8 * const e)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_ISUTF8_CHAR \