From: Florian Ragwitz Date: Fri, 14 Aug 2009 00:01:19 +0000 (+0200) Subject: No need to create an empty PV first. X-Git-Tag: 0.005011~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0439e9715904cbcd490005ad62f6ec30219e4ca;p=p5sagit%2FDevel-Declare.git No need to create an empty PV first. --- diff --git a/Declare.xs b/Declare.xs index 0474261..3a4ff95 100644 --- a/Declare.xs +++ b/Declare.xs @@ -394,8 +394,7 @@ STATIC OP *dd_ck_const(pTHX_ OP *o, void *user_data) { s = scan_word(s, buf, sizeof buf, FALSE, &len); if (strnEQ(buf, name, len)) { char *d; - SV *inject = newSVpv("", 0); - sv_catpvn(inject, SvPV_nolen(PL_linestr), PL_bufptr - SvPVX(PL_linestr)); + SV *inject = newSVpvn(SvPVX(PL_linestr), PL_bufptr - SvPVX(PL_linestr)); sv_catpvn(inject, buf, len); d = peekspace(s);