projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53ce71d
)
newSV(size) and SvPOK_on() will be more efficient than newSVpvs("")
author
Nicholas Clark
<nick@ccl4.org>
Sat, 6 Oct 2007 12:55:29 +0000
(12:55 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Sat, 6 Oct 2007 12:55:29 +0000
(12:55 +0000)
followed by SvGROW(size+1)
p4raw-id: //depot/perl@32045
utf8.c
patch
|
blob
|
history
diff --git
a/utf8.c
b/utf8.c
index 45b17b1b629b76a37d59d0beddfcd37119439abb..e9e14fc6c3fd815cced8e176764895a8bf8e5f86 100644
(file)
--- a/
utf8.c
+++ b/
utf8.c
@@
-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;