summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-10-30 18:04:17 +0000
committerNicholas Clark <nick@ccl4.org>2005-10-30 18:04:17 +0000
commit038e8d3c44243c2a2ae7cca24ca6b3918f23f942 (patch)
tree3c719af9fd29828ee0dd15686a3125699c15db45
parent4eef6d8d75c055d9416392015dd5f1e09e69fc3f (diff)
downloadperl-038e8d3c44243c2a2ae7cca24ca6b3918f23f942.tar.gz
Replace uvuni_to_utf8() with a macro that passes the extra 0 argument
to uvuni_to_utf8_flags(). Move the old body to mathoms.c p4raw-id: //depot/perl@25905
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mathoms.c6
-rw-r--r--proto.h4
-rw-r--r--utf8.c6
-rw-r--r--utf8.h1
6 files changed, 10 insertions, 11 deletions
diff --git a/embed.fnc b/embed.fnc
index 819163fef3..0d6bce4b31 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -860,7 +860,7 @@ Apd |UV |utf8_to_uvuni |NN const U8 *s|NULLOK STRLEN *retlen
Adp |UV |utf8n_to_uvchr |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
Adp |UV |utf8n_to_uvuni |NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
Apd |U8* |uvchr_to_utf8 |NN U8 *d|UV uv
-Ap |U8* |uvuni_to_utf8 |NN U8 *d|UV uv
+Apbm |U8* |uvuni_to_utf8 |NN U8 *d|UV uv
Ap |U8* |uvchr_to_utf8_flags |NN U8 *d|UV uv|UV flags
Apd |U8* |uvuni_to_utf8_flags |NN U8 *d|UV uv|UV flags
Apd |char* |pv_uni_display |NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags
diff --git a/embed.h b/embed.h
index bd52baf2f1..bc1b068a2f 100644
--- a/embed.h
+++ b/embed.h
@@ -887,7 +887,6 @@
#define utf8n_to_uvchr Perl_utf8n_to_uvchr
#define utf8n_to_uvuni Perl_utf8n_to_uvuni
#define uvchr_to_utf8 Perl_uvchr_to_utf8
-#define uvuni_to_utf8 Perl_uvuni_to_utf8
#define uvchr_to_utf8_flags Perl_uvchr_to_utf8_flags
#define uvuni_to_utf8_flags Perl_uvuni_to_utf8_flags
#define pv_uni_display Perl_pv_uni_display
@@ -2866,7 +2865,6 @@
#define utf8n_to_uvchr(a,b,c,d) Perl_utf8n_to_uvchr(aTHX_ a,b,c,d)
#define utf8n_to_uvuni(a,b,c,d) Perl_utf8n_to_uvuni(aTHX_ a,b,c,d)
#define uvchr_to_utf8(a,b) Perl_uvchr_to_utf8(aTHX_ a,b)
-#define uvuni_to_utf8(a,b) Perl_uvuni_to_utf8(aTHX_ a,b)
#define uvchr_to_utf8_flags(a,b,c) Perl_uvchr_to_utf8_flags(aTHX_ a,b,c)
#define uvuni_to_utf8_flags(a,b,c) Perl_uvuni_to_utf8_flags(aTHX_ a,b,c)
#define pv_uni_display(a,b,c,d,e) Perl_pv_uni_display(aTHX_ a,b,c,d,e)
diff --git a/mathoms.c b/mathoms.c
index 307915ccdb..d8a84b5ba2 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -782,6 +782,12 @@ PP(pp_mapstart)
DIE(aTHX_ "panic: mapstart"); /* uses grepstart */
}
+U8 *
+Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
+{
+ return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0);
+}
+
bool
Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
{
diff --git a/proto.h b/proto.h
index c048db84f3..65a23ca12b 100644
--- a/proto.h
+++ b/proto.h
@@ -2397,8 +2397,8 @@ PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *r
PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
- __attribute__nonnull__(pTHX_1);
+/* PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
+ __attribute__nonnull__(pTHX_1); */
PERL_CALLCONV U8* Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
__attribute__nonnull__(pTHX_1);
diff --git a/utf8.c b/utf8.c
index be4a2e9bdd..5af5215d6d 100644
--- a/utf8.c
+++ b/utf8.c
@@ -166,12 +166,6 @@ Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
#endif
#endif /* Loop style */
}
-
-U8 *
-Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv)
-{
- return Perl_uvuni_to_utf8_flags(aTHX_ d, uv, 0);
-}
/*
diff --git a/utf8.h b/utf8.h
index 9546fe8486..18cb7b2dbb 100644
--- a/utf8.h
+++ b/utf8.h
@@ -332,6 +332,7 @@ encoded character.
#define IS_UTF8_CHAR_FAST(n) ((n) <= 4)
+#define uvuni_to_utf8(d, uv) uvuni_to_utf8_flags(d, uv, 0)
#define is_utf8_string_loc(s, len, ep) is_utf8_string_loclen(s, len, ep, 0)
#endif /* IS_UTF8_CHAR() for UTF-8 */