summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-04-30 08:04:45 -0600
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:56:07 -0600
commit07693fe64de170ae254d8e190ac8c1f51869bc3c (patch)
tree06cdc3a4a66231b9c2f97d19ca5bb59c8dc3e612 /utf8.c
parent29e828265b1f72ba4d731f515e4388f8467d65e8 (diff)
downloadperl-07693fe64de170ae254d8e190ac8c1f51869bc3c.tar.gz
utf8.c: Move 2 functions to earlier in file
This moves these two functions to be adjacent to the function they each call, thus keeping like things together.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/utf8.c b/utf8.c
index 7e87a0d1fe..e738801e13 100644
--- a/utf8.c
+++ b/utf8.c
@@ -264,6 +264,42 @@ Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
}
/*
+=for apidoc uvchr_to_utf8
+
+Adds the UTF-8 representation of the Native code point C<uv> to the end
+of the string C<d>; C<d> should have at least C<UTF8_MAXBYTES+1> free
+bytes available. The return value is the pointer to the byte after the
+end of the new character. In other words,
+
+ d = uvchr_to_utf8(d, uv);
+
+is the recommended wide native character-aware way of saying
+
+ *(d++) = uv;
+
+=cut
+*/
+
+/* On ASCII machines this is normally a macro but we want a
+ real function in case XS code wants it
+*/
+U8 *
+Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
+{
+ PERL_ARGS_ASSERT_UVCHR_TO_UTF8;
+
+ return Perl_uvoffuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), 0);
+}
+
+U8 *
+Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
+{
+ PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS;
+
+ return Perl_uvoffuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), flags);
+}
+
+/*
Tests if the first C<len> bytes of string C<s> form a valid UTF-8
character. Note that an INVARIANT (i.e. ASCII) character is a valid
@@ -4216,42 +4252,6 @@ Perl__get_swash_invlist(pTHX_ SV* const swash)
}
/*
-=for apidoc uvchr_to_utf8
-
-Adds the UTF-8 representation of the Native code point C<uv> to the end
-of the string C<d>; C<d> should have at least C<UTF8_MAXBYTES+1> free
-bytes available. The return value is the pointer to the byte after the
-end of the new character. In other words,
-
- d = uvchr_to_utf8(d, uv);
-
-is the recommended wide native character-aware way of saying
-
- *(d++) = uv;
-
-=cut
-*/
-
-/* On ASCII machines this is normally a macro but we want a
- real function in case XS code wants it
-*/
-U8 *
-Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
-{
- PERL_ARGS_ASSERT_UVCHR_TO_UTF8;
-
- return Perl_uvoffuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), 0);
-}
-
-U8 *
-Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
-{
- PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS;
-
- return Perl_uvoffuni_to_utf8_flags(aTHX_ d, NATIVE_TO_UNI(uv), flags);
-}
-
-/*
=for apidoc utf8n_to_uvchr
Returns the native character value of the first character in the string