diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-08-09 19:59:06 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-09 19:59:06 +0200 |
commit | 8ee52affe7fd4daa03e002bc06611f0a8c3bcd5b (patch) | |
tree | bf218a0a9a9a0c8c182aca16491f5063f79acce5 /src/profiler.c | |
parent | eed9616120f60ad17d5e133f505bba5c559aee89 (diff) | |
download | vim-git-8ee52affe7fd4daa03e002bc06611f0a8c3bcd5b.tar.gz |
patch 8.2.3320: some local functions are not staticv8.2.3320
Problem: Some local functions are not static.
Solution: Add "static". Move snprintf() related code to strings.c.
(Yegappan Lakshmanan, closes #8734)
Diffstat (limited to 'src/profiler.c')
-rw-r--r-- | src/profiler.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/profiler.c b/src/profiler.c index 6f2f2d0a8..3638a0b5c 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -555,6 +555,24 @@ func_do_profile(ufunc_T *fp) } /* + * Save time when starting to invoke another script or function. + */ + static void +script_prof_save( + proftime_T *tm) // place to store wait time +{ + scriptitem_T *si; + + if (SCRIPT_ID_VALID(current_sctx.sc_sid)) + { + si = SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && si->sn_pr_nest++ == 0) + profile_start(&si->sn_pr_child); + } + profile_get_wait(tm); +} + +/* * When calling a function: may initialize for profiling. */ void @@ -793,24 +811,6 @@ script_do_profile(scriptitem_T *si) } /* - * Save time when starting to invoke another script or function. - */ - void -script_prof_save( - proftime_T *tm) // place to store wait time -{ - scriptitem_T *si; - - if (SCRIPT_ID_VALID(current_sctx.sc_sid)) - { - si = SCRIPT_ITEM(current_sctx.sc_sid); - if (si->sn_prof_on && si->sn_pr_nest++ == 0) - profile_start(&si->sn_pr_child); - } - profile_get_wait(tm); -} - -/* * Count time spent in children after invoking another script or function. */ void |