Skip to content

Commit

Permalink
improve fscript
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 6, 2023
1 parent e620aaa commit e838677
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tkc/fscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -3211,6 +3211,10 @@ static ret_t fscript_func_call_init_func(fscript_func_call_t* call, tk_object_t*
}
}

if (func == NULL && s_global_funcs != NULL) {
func = (fscript_func_t)general_factory_find(s_global_funcs, func_name);
}

if (func == NULL) {
value_t v;
if (tk_object_get_prop(obj, func_name, &v) == RET_OK && v.type == VALUE_TYPE_FUNC_DEF) {
Expand All @@ -3236,10 +3240,6 @@ static ret_t fscript_func_call_init_func(fscript_func_call_t* call, tk_object_t*
}
}

if (func == NULL && s_global_funcs != NULL) {
func = (fscript_func_t)general_factory_find(s_global_funcs, func_name);
}

if (func == NULL) {
func = func_noop;
}
Expand Down

0 comments on commit e838677

Please sign in to comment.