Skip to content

Commit ca16c60

Browse files
committed
patch 9.0.0398: members of funccall_T are inconsistently named
Problem: Members of funccall_T are inconsistently named. Solution: Use the "fc_" prefix for all members.
1 parent 5877985 commit ca16c60

6 files changed

Lines changed: 170 additions & 165 deletions

File tree

src/evalvars.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3391,7 +3391,8 @@ find_var_ht(char_u *name, char_u **varname)
33913391
if (*name == 'v') // v: variable
33923392
return &vimvarht;
33933393
if (get_current_funccal() != NULL
3394-
&& get_current_funccal()->func->uf_def_status == UF_NOT_COMPILED)
3394+
&& get_current_funccal()->fc_func->uf_def_status
3395+
== UF_NOT_COMPILED)
33953396
{
33963397
// a: and l: are only used in functions defined with ":function"
33973398
if (*name == 'a') // a: function argument

src/profiler.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ prof_child_enter(
718718
{
719719
funccall_T *fc = get_current_funccal();
720720

721-
if (fc != NULL && fc->func->uf_profiling)
722-
profile_start(&fc->prof_child);
721+
if (fc != NULL && fc->fc_func->uf_profiling)
722+
profile_start(&fc->fc_prof_child);
723723
script_prof_save(tm);
724724
}
725725

@@ -733,12 +733,12 @@ prof_child_exit(
733733
{
734734
funccall_T *fc = get_current_funccal();
735735

736-
if (fc != NULL && fc->func->uf_profiling)
736+
if (fc != NULL && fc->fc_func->uf_profiling)
737737
{
738-
profile_end(&fc->prof_child);
739-
profile_sub_wait(tm, &fc->prof_child); // don't count waiting time
740-
profile_add(&fc->func->uf_tm_children, &fc->prof_child);
741-
profile_add(&fc->func->uf_tml_children, &fc->prof_child);
738+
profile_end(&fc->fc_prof_child);
739+
profile_sub_wait(tm, &fc->fc_prof_child); // don't count waiting time
740+
profile_add(&fc->fc_func->uf_tm_children, &fc->fc_prof_child);
741+
profile_add(&fc->fc_func->uf_tml_children, &fc->fc_prof_child);
742742
}
743743
script_prof_restore(tm);
744744
}
@@ -753,7 +753,7 @@ prof_child_exit(
753753
func_line_start(void *cookie, long lnum)
754754
{
755755
funccall_T *fcp = (funccall_T *)cookie;
756-
ufunc_T *fp = fcp->func;
756+
ufunc_T *fp = fcp->fc_func;
757757

758758
if (fp->uf_profiling && lnum >= 1 && lnum <= fp->uf_lines.ga_len)
759759
{
@@ -775,7 +775,7 @@ func_line_start(void *cookie, long lnum)
775775
func_line_exec(void *cookie)
776776
{
777777
funccall_T *fcp = (funccall_T *)cookie;
778-
ufunc_T *fp = fcp->func;
778+
ufunc_T *fp = fcp->fc_func;
779779

780780
if (fp->uf_profiling && fp->uf_tml_idx >= 0)
781781
fp->uf_tml_execed = TRUE;
@@ -788,7 +788,7 @@ func_line_exec(void *cookie)
788788
func_line_end(void *cookie)
789789
{
790790
funccall_T *fcp = (funccall_T *)cookie;
791-
ufunc_T *fp = fcp->func;
791+
ufunc_T *fp = fcp->fc_func;
792792

793793
if (fp->uf_profiling && fp->uf_tml_idx >= 0)
794794
{

src/structs.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,40 +1735,40 @@ typedef struct
17351735
*/
17361736
struct funccall_S
17371737
{
1738-
ufunc_T *func; // function being called
1739-
int linenr; // next line to be executed
1740-
int returned; // ":return" used
1738+
ufunc_T *fc_func; // function being called
1739+
int fc_linenr; // next line to be executed
1740+
int fc_returned; // ":return" used
17411741
struct // fixed variables for arguments
17421742
{
17431743
dictitem_T var; // variable (without room for name)
17441744
char_u room[VAR_SHORT_LEN]; // room for the name
1745-
} fixvar[FIXVAR_CNT];
1746-
dict_T l_vars; // l: local function variables
1747-
dictitem_T l_vars_var; // variable for l: scope
1748-
dict_T l_avars; // a: argument variables
1749-
dictitem_T l_avars_var; // variable for a: scope
1750-
list_T l_varlist; // list for a:000
1751-
listitem_T l_listitems[MAX_FUNC_ARGS]; // listitems for a:000
1752-
typval_T *rettv; // return value
1753-
linenr_T breakpoint; // next line with breakpoint or zero
1754-
int dbg_tick; // debug_tick when breakpoint was set
1755-
int level; // top nesting level of executed function
1745+
} fc_fixvar[FIXVAR_CNT];
1746+
dict_T fc_l_vars; // l: local function variables
1747+
dictitem_T fc_l_vars_var; // variable for l: scope
1748+
dict_T fc_l_avars; // a: argument variables
1749+
dictitem_T fc_l_avars_var; // variable for a: scope
1750+
list_T fc_l_varlist; // list for a:000
1751+
listitem_T fc_l_listitems[MAX_FUNC_ARGS]; // listitems for a:000
1752+
typval_T *fc_rettv; // return value
1753+
linenr_T fc_breakpoint; // next line with breakpoint or zero
1754+
int fc_dbg_tick; // debug_tick when breakpoint was set
1755+
int fc_level; // top nesting level of executed function
17561756

17571757
garray_T fc_defer; // functions to be called on return
17581758
ectx_T *fc_ectx; // execution context for :def function, NULL
17591759
// otherwise
17601760

17611761
#ifdef FEAT_PROFILE
1762-
proftime_T prof_child; // time spent in a child
1762+
proftime_T fc_prof_child; // time spent in a child
17631763
#endif
1764-
funccall_T *caller; // calling function or NULL; or next funccal in
1764+
funccall_T *fc_caller; // calling function or NULL; or next funccal in
17651765
// list pointed to by previous_funccal.
17661766

17671767
// for closure
17681768
int fc_refcount; // number of user functions that reference this
17691769
// funccal
17701770
int fc_copyID; // for garbage collection
1771-
garray_T fc_funcs; // list of ufunc_T* which keep a reference to
1771+
garray_T fc_ufuncs; // list of ufunc_T* which keep a reference to
17721772
// "func"
17731773
};
17741774

0 commit comments

Comments
 (0)