diff options
author | Karl Williamson <khw@cpan.org> | 2016-08-11 16:42:20 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-08-17 15:23:59 -0600 |
commit | 1065615957bc3821a00a319d54f18f443fc2861e (patch) | |
tree | 1e7974fe0057f8e62de957de28483f7b0ac94c72 /perl.c | |
parent | cc890588b0ce25c7e37126933582b6d944ad1584 (diff) | |
download | perl-1065615957bc3821a00a319d54f18f443fc2861e.tar.gz |
Take advantage of SvGROW's return value
I had not realized that SvGROW returned the new string pointer. Using
that makes a one-step process from a two-step process.
I examined the code for other possible occurrences, and found others
where it seemed that the two-step seemed clearer, so left those alone.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -3224,8 +3224,7 @@ Perl_moreswitches(pTHX_ const char *s) s--; } PL_rs = newSVpvs(""); - SvGROW(PL_rs, (STRLEN)(UVCHR_SKIP(rschar) + 1)); - tmps = (U8*)SvPVX(PL_rs); + tmps = (U8*) SvGROW(PL_rs, (STRLEN)(UVCHR_SKIP(rschar) + 1)); uvchr_to_utf8(tmps, rschar); SvCUR_set(PL_rs, UVCHR_SKIP(rschar)); SvUTF8_on(PL_rs); |