summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-01-21 17:06:14 +0000
committerNicholas Clark <nick@ccl4.org>2009-01-21 17:09:11 +0000
commit3f48f963d8052f436b4eec3a766d77f2675fee9a (patch)
treeb7d914c363ddf1558d39a95d38b273a7a7f8b982 /ext
parentb96d8cd966afa49291119752aac86cd1f1de5560 (diff)
downloadperl-3f48f963d8052f436b4eec3a766d77f2675fee9a.tar.gz
Convert db_get_cv() to use get_cvn_flags() as it already knows the length of
the string that it is passing.
Diffstat (limited to 'ext')
-rw-r--r--ext/Devel/DProf/DProf.xs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs
index ea36b2408a..4eef0bc289 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 {