Revision: 1016
Author: [email protected]
Date: Mon Jan 18 08:56:38 2010
Log: Use sv_setpvs() instead of sv_setpv() when possible.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1016
Modified:
/trunk/NYTProf.xs
=======================================
--- /trunk/NYTProf.xs Mon Jan 18 08:43:32 2010
+++ /trunk/NYTProf.xs Mon Jan 18 08:56:38 2010
@@ -1909,7 +1909,7 @@
*/
SV *sv = *hv_fetch(GvHV(PL_DBsub), called_subname_pv,
strlen(called_subname_pv), 1);
if (!SvOK(sv))
- sv_setpv(sv, ":0-0"); /* empty file name */
+ sv_setpvs(sv, ":0-0"); /* empty file name */
if (trace_level >= 2)
logwarn("Adding fake DBsub entry for '%s' xsub\n",
called_subname_pv);
}
@@ -2214,7 +2214,7 @@
* some sub is called from main::RUNTIME. That may change.
*/
subr_entry->caller_subpkg_pv = "main";
- sv_setpv(subr_entry->caller_subnam_sv, "RUNTIME"); /* *cough*
*/
+ sv_setpvs(subr_entry->caller_subnam_sv, "RUNTIME"); /* *cough*
*/
++main_runtime_used;
}
else if (caller_cv == 0) {
@@ -2222,7 +2222,7 @@
* possibly because perl_run() has already returned
*/
subr_entry->caller_subpkg_pv = "main";
- sv_setpv(subr_entry->caller_subnam_sv, "NULL"); /* *cough* */
+ sv_setpvs(subr_entry->caller_subnam_sv, "NULL"); /* *cough* */
}
else {
HV *stash_hv = NULL;
@@ -2242,7 +2242,7 @@
sv_dump((SV*)caller_cv);
subr_entry->caller_subpkg_pv = "__UNKNOWN__";
- sv_setpv(subr_entry->caller_subnam_sv, "__UNKNOWN__");
+ sv_setpvs(subr_entry->caller_subnam_sv, "__UNKNOWN__");
}
}
found_caller_by = (profile_findcaller) ? "" : "(calculated)";
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]