reimplement sv_uni_display() using that.
p4raw-id: //depot/perl@12619
}
char *
-Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
+Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
{
int truncated = 0;
char *s, *e;
sv_setpvn(dsv, "", 0);
- for (s = SvPVX(ssv), e = s + SvCUR(ssv); s < e; s += UTF8SKIP(s)) {
+ for (s = (char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) {
UV u;
if (pvlim && SvCUR(dsv) >= pvlim) {
truncated++;
}
char *
+Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
+{
+ return Perl_pv_uni_display(aTHX_ dsv, (U8*)SvPVX(ssv), SvCUR(ssv),
+ pvlim, flags);
+}
+
+char *
Perl_sv_peek(pTHX_ SV *sv)
{
SV *t = sv_newmortal();
#define sv_usepvn_mg Perl_sv_usepvn_mg
#define get_vtbl Perl_get_vtbl
#define pv_display Perl_pv_display
+#define pv_uni_display Perl_pv_uni_display
#define sv_uni_display Perl_sv_uni_display
#define dump_indent Perl_dump_indent
#define dump_vindent Perl_dump_vindent
#define sv_usepvn_mg(a,b,c) Perl_sv_usepvn_mg(aTHX_ a,b,c)
#define get_vtbl(a) Perl_get_vtbl(aTHX_ a)
#define pv_display(a,b,c,d,e) Perl_pv_display(aTHX_ a,b,c,d,e)
+#define pv_uni_display(a,b,c,d,e) Perl_pv_uni_display(aTHX_ a,b,c,d,e)
#define sv_uni_display(a,b,c,d) Perl_sv_uni_display(aTHX_ a,b,c,d)
#define dump_vindent(a,b,c,d) Perl_dump_vindent(aTHX_ a,b,c,d)
#define do_gv_dump(a,b,c,d) Perl_do_gv_dump(aTHX_ a,b,c,d)
Ap |MGVTBL*|get_vtbl |int vtbl_id
p |char* |pv_display |SV *dsv|char *pv|STRLEN cur|STRLEN len \
|STRLEN pvlim
+p |char* |pv_uni_display |SV *dsv|U8 *spv|STRLEN len \
+ |STRLEN pvlim|UV flags
p |char* |sv_uni_display |SV *dsv|SV *ssv|STRLEN pvlim|UV flags
Afp |void |dump_indent |I32 level|PerlIO *file|const char* pat|...
Ap |void |dump_vindent |I32 level|PerlIO *file|const char* pat \
PERL_CALLCONV void Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len);
PERL_CALLCONV MGVTBL* Perl_get_vtbl(pTHX_ int vtbl_id);
PERL_CALLCONV char* Perl_pv_display(pTHX_ SV *dsv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim);
+PERL_CALLCONV char* Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags);
PERL_CALLCONV char* Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags);
PERL_CALLCONV void Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* pat, ...)
#ifdef CHECK_FORMAT