From: Nicholas Clark Date: Tue, 6 Dec 2005 13:56:15 +0000 (+0000) Subject: Don't use Copy for 1 and 2 character string constants. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd0e59aa9623dc38e7eeafa9836a6ce08f163f0d;p=p5sagit%2Fp5-mst-13.2.git Don't use Copy for 1 and 2 character string constants. p4raw-id: //depot/perl@26275 --- diff --git a/sv.c b/sv.c index d7ed3ea..464c436 100644 --- a/sv.c +++ b/sv.c @@ -2674,9 +2674,10 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags) } Newx(mg->mg_ptr, mg->mg_len + 1 + left, char); - Copy("(?", mg->mg_ptr, 2, char); + mg->mg_ptr[0] = '('; + mg->mg_ptr[1] = '?'; Copy(reflags, mg->mg_ptr+2, left, char); - Copy(":", mg->mg_ptr+left+2, 1, char); + *(mg->mg_ptr+left+2) = ':'; Copy(re->precomp, mg->mg_ptr+3+left, re->prelen, char); if (need_newline) mg->mg_ptr[mg->mg_len - 2] = '\n';