diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-06 12:55:29 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-06 12:55:29 +0000 |
commit | e524fe407db4cb29ab7ae7ba25321a418c897171 (patch) | |
tree | f784f572e68338ccda0efb6993d1b8ce3b8703bd /utf8.c | |
parent | 53ce71d37f27a80bc42faba5c56ff7a3580a11f8 (diff) | |
download | perl-e524fe407db4cb29ab7ae7ba25321a418c897171.tar.gz |
newSV(size) and SvPOK_on() will be more efficient than newSVpvs("")
followed by SvGROW(size+1)
p4raw-id: //depot/perl@32045
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1774,9 +1774,9 @@ S_swash_get(pTHX_ SV* swash, UV start, UV span) } /* create and initialize $swatch */ - swatch = newSVpvs(""); scur = octets ? (span * octets) : (span + 7) / 8; - SvGROW(swatch, scur + 1); + swatch = newSV(scur); + SvPOK_on(swatch); s = (U8*)SvPVX(swatch); if (octets && none) { const U8* const e = s + scur; |