From: Nicholas Clark Date: Wed, 21 Jan 2009 17:06:14 +0000 (+0000) Subject: Convert db_get_cv() to use get_cvn_flags() as it already knows the length of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3f48f963d8052f436b4eec3a766d77f2675fee9a;p=p5sagit%2Fp5-mst-13.2.git Convert db_get_cv() to use get_cvn_flags() as it already knows the length of the string that it is passing. --- diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index ea36b24..4eef0bc 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -24,7 +24,9 @@ db_get_cv(pTHX_ SV *sv) cv = INT2PTR(CV*,SvIVX(sv)); } else { if (SvPOK(sv)) { - cv = get_cv(SvPVX_const(sv), GV_ADD); + STRLEN len; + const char *const name = SvPV(sv, len); + cv = get_cvn_flags(name, len, GV_ADD | SvUTF8(sv)); } else if (SvROK(sv)) { cv = (CV*)SvRV(sv); } else {