This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Replace uvuni_to_utf8() with a macro that passes the extra 0 argument
authorNicholas Clark <nick@ccl4.org>
Sun, 30 Oct 2005 18:04:17 +0000 (18:04 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 30 Oct 2005 18:04:17 +0000 (18:04 +0000)
to uvuni_to_utf8_flags(). Move the old body to mathoms.c

p4raw-id: //depot/perl@25905

embed.fnc
embed.h
mathoms.c
proto.h
utf8.c
utf8.h

index 819163f..0d6bce4 100644 (file)
--- 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 bd52baf..bc1b068 100644 (file)
--- a/embed.h
+++ b/embed.h
 #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
 #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)
index 307915c..d8a84b5 100644 (file)
--- 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 c048db8..65a23ca 100644 (file)
--- 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 be4a2e9..5af5215 100644 (file)
--- 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 9546fe8..18cb7b2 100644 (file)
--- 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 */