Mercurial > vim
diff src/profiler.c @ 25567:0082503ff2ff v8.2.3320
patch 8.2.3320: some local functions are not static
Commit: https://github.com/vim/vim/commit/8ee52affe7fd4daa03e002bc06611f0a8c3bcd5b
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Aug 9 19:59:06 2021 +0200
patch 8.2.3320: some local functions are not static
Problem: Some local functions are not static.
Solution: Add "static". Move snprintf() related code to strings.c.
(Yegappan Lakshmanan, closes #8734)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 09 Aug 2021 20:00:06 +0200 |
parents | 03819ebd3e6d |
children | 06a137af96f8 |
line wrap: on
line diff
--- 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