summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2004-03-24 09:16:52 +0900
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-05 12:51:10 +0000
commit46ec2f140c7050c2c6553ebf8e07a3f368560ff0 (patch)
tree46ee559d7145e28c4a767c05d1ed46ced4b9b855 /sv.c
parentcc37eb0b599d134736fb6f123ae6520fdea588e3 (diff)
downloadperl-46ec2f140c7050c2c6553ebf8e07a3f368560ff0.tar.gz
sv_pvutf8n_force and sv_pvbyten_force
Message-Id: <20040324001126.098F.BQW10602@nifty.com> p4raw-id: //depot/perl@22652
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 8e88ae20b2..c3a5a38f75 100644
--- a/sv.c
+++ b/sv.c
@@ -7835,8 +7835,10 @@ instead.
char *
Perl_sv_pvbyten_force(pTHX_ SV *sv, STRLEN *lp)
{
+ sv_pvn_force(sv,lp);
sv_utf8_downgrade(sv,0);
- return sv_pvn_force(sv,lp);
+ *lp = SvCUR(sv);
+ return SvPVX(sv);
}
/* sv_pvutf8 () is now a macro using Perl_sv_2pv_flags();
@@ -7884,8 +7886,10 @@ instead.
char *
Perl_sv_pvutf8n_force(pTHX_ SV *sv, STRLEN *lp)
{
+ sv_pvn_force(sv,lp);
sv_utf8_upgrade(sv);
- return sv_pvn_force(sv,lp);
+ *lp = SvCUR(sv);
+ return SvPVX(sv);
}
/*