From: Nicholas Clark Date: Sun, 30 Oct 2005 18:04:17 +0000 (+0000) Subject: Replace uvuni_to_utf8() with a macro that passes the extra 0 argument X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=038e8d3c44243c2a2ae7cca24ca6b3918f23f942;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/embed.fnc b/embed.fnc index 819163f..0d6bce4 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 bd52baf..bc1b068 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 307915c..d8a84b5 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 c048db8..65a23ca 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 be4a2e9..5af5215 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 9546fe8..18cb7b2 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 */