@@ -121,7 +121,7 @@ bool tea_decl_fn(const tea_node_t *node, tea_list_entry_t *functions)
121121
122122bool tea_interp_fn_decl (tea_ctx_t * ctx , const tea_node_t * node )
123123{
124- return tea_decl_fn (node , & ctx -> fns );
124+ return tea_decl_fn (node , & ctx -> funcs );
125125}
126126
127127tea_val_t tea_eval_native_fn_call (tea_ctx_t * ctx , tea_scope_t * scp ,
@@ -269,21 +269,20 @@ tea_val_t tea_eval_fn_call(tea_ctx_t *ctx, tea_scope_t *scp,
269269
270270 if (function ) {
271271 // declare 'self' for the scope
272- tea_decl_var (ctx , & inner_scope , "self" ,
273- function -> mut ? TEA_VAR_MUT : 0 ,
274- NULL , object_node );
272+ tea_decl_var (ctx , & inner_scope , "self" , function -> mut ? TEA_VAR_MUT : 0 ,
273+ NULL , object_node );
275274 }
276275 } else {
277276 const tea_tok_t * token = node -> tok ;
278277 if (token ) {
279278 const tea_native_fn_t * nat_fn =
280- tea_ctx_find_native_fn (& ctx -> nfns , token -> buf );
279+ tea_ctx_find_native_fn (& ctx -> native_funcs , token -> buf );
281280 if (nat_fn ) {
282281 return tea_eval_native_fn_call (ctx , scp , nat_fn , args );
283282 }
284283
285284 function_name = token -> buf ;
286- function = tea_ctx_find_fn (& ctx -> fns , token -> buf );
285+ function = tea_ctx_find_fn (& ctx -> funcs , token -> buf );
287286 }
288287 }
289288
@@ -394,6 +393,6 @@ void tea_bind_native_fn(tea_ctx_t *ctx, const char *name,
394393 if (function ) {
395394 function -> name = name ;
396395 function -> cb = cb ;
397- tea_list_add_tail (& ctx -> nfns , & function -> link );
396+ tea_list_add_tail (& ctx -> native_funcs , & function -> link );
398397 }
399398}
0 commit comments