From: Jarkko Hietaniemi Date: Tue, 2 Jan 2001 23:40:26 +0000 (+0000) Subject: Variable naming tweak. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46199a120e0d0344e523fec7182acc65cffe223f;p=p5sagit%2Fp5-mst-13.2.git Variable naming tweak. p4raw-id: //depot/perl@8301 --- diff --git a/sv.c b/sv.c index 24ac053..b999e6c 100644 --- a/sv.c +++ b/sv.c @@ -3755,33 +3755,33 @@ not 'set' magic. See C. =cut */ void -Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) +Perl_sv_catsv(pTHX_ SV *dsv, register SV *ssv) { char *spv; STRLEN slen; - if (!sstr) + if (!ssv) return; - if ((spv = SvPV(sstr, slen))) { - bool dutf8 = DO_UTF8(dstr); - bool sutf8 = DO_UTF8(sstr); + if ((spv = SvPV(ssv, slen))) { + bool dutf8 = DO_UTF8(dsv); + bool sutf8 = DO_UTF8(ssv); if (dutf8 == sutf8) - sv_catpvn(dstr,spv,slen); + sv_catpvn(dsv,spv,slen); else { if (dutf8) { - SV* cstr = newSVsv(sstr); + /* Not modifying source SV, so taking a temporary copy. */ + SV* csv = sv_2mortal(newSVsv(ssv)); char *cpv; STRLEN clen; - sv_utf8_upgrade(cstr); - cpv = SvPV(cstr,clen); - sv_catpvn(dstr,cpv,clen); - sv_2mortal(cstr); + sv_utf8_upgrade(csv); + cpv = SvPV(csv,clen); + sv_catpvn(dsv,cpv,clen); } else { - sv_utf8_upgrade(dstr); - sv_catpvn(dstr,spv,slen); - SvUTF8_on(dstr); + sv_utf8_upgrade(dsv); + sv_catpvn(dsv,spv,slen); + SvUTF8_on(dsv); /* If dsv has no wide characters. */ } } } @@ -3796,10 +3796,10 @@ Like C, but also handles 'set' magic. */ void -Perl_sv_catsv_mg(pTHX_ SV *dstr, register SV *sstr) +Perl_sv_catsv_mg(pTHX_ SV *dsv, register SV *ssv) { - sv_catsv(dstr,sstr); - SvSETMAGIC(dstr); + sv_catsv(dsv,ssv); + SvSETMAGIC(dsv); } /*