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)
This commit is contained in:
Yegappan Lakshmanan
2021-08-09 19:59:06 +02:00
committed by Bram Moolenaar
parent eed9616120
commit 8ee52affe7
31 changed files with 1303 additions and 1327 deletions

View File

@ -554,6 +554,24 @@ func_do_profile(ufunc_T *fp)
fp->uf_profiling = TRUE;
}
/*
* 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.
*/
@ -792,24 +810,6 @@ script_do_profile(scriptitem_T *si)
si->sn_pr_nest = 0;
}
/*
* 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.
*/