fix: prof functions

This commit is contained in:
Jakub Łuczyński
2020-02-10 12:03:55 +01:00
parent 04f7e1f56d
commit b683957763
2 changed files with 7 additions and 2 deletions

View File

@@ -1131,7 +1131,7 @@ void *call_func_retlist(const char_u *func, int argc, typval_T *argv)
void prof_child_enter(proftime_T *tm /* place to store waittime */
)
{
funccall_T *fc = current_funccal;
funccall_T *fc = get_current_funccal();
if (fc != NULL && fc->func->uf_profiling) {
fc->prof_child = profile_start();
@@ -1147,7 +1147,7 @@ void prof_child_enter(proftime_T *tm /* place to store waittime */
void prof_child_exit(proftime_T *tm /* where waittime was stored */
)
{
funccall_T *fc = current_funccal;
funccall_T *fc = get_current_funccal();
if (fc != NULL && fc->func->uf_profiling) {
fc->prof_child = profile_end(fc->prof_child);

View File

@@ -1120,6 +1120,11 @@ void restore_funccal(void *vfc)
current_funccal = (funccall_T *)vfc;
}
funccall_T *get_current_funccal(void)
{
return current_funccal;
}
#if defined(EXITFREE)
void free_all_functions(void)
{