Skip to content

Commit 4d858b2

Browse files
committed
Rename fns -> funcs
1 parent 4dea85f commit 4d858b2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

include/tea_struct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ typedef struct {
88
tea_list_entry_t link;
99
const tea_node_t *node;
1010
unsigned long field_cnt;
11-
tea_list_entry_t fns;
11+
tea_list_entry_t funcs;
1212
} tea_struct_decl_t;
1313

1414
bool tea_interp_struct_decl(tea_ctx_t *ctx, const tea_node_t *node);

src/tea_fn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ tea_val_t tea_eval_fn_call(tea_ctx_t *ctx, tea_scope_t *scp,
265265
}
266266

267267
function_name = field_token->buf;
268-
function = tea_ctx_find_fn(&struct_declaration->fns, function_name);
268+
function = tea_ctx_find_fn(&struct_declaration->funcs, function_name);
269269

270270
if (function) {
271271
// declare 'self' for the scope

src/tea_interp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void tea_interp_cleanup(const tea_ctx_t *ctx)
4444
tea_list_entry_t *function_entry;
4545
tea_list_entry_t *function_entry_safe;
4646
tea_list_for_each_safe(function_entry, function_entry_safe,
47-
&struct_declaration->fns)
47+
&struct_declaration->funcs)
4848
{
4949
tea_fn_t *function = tea_list_record(function_entry, tea_fn_t, link);
5050
tea_list_remove(function_entry);

src/tea_struct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool tea_interp_struct_decl(tea_ctx_t *ctx, const tea_node_t *node)
1919

2020
struct_declaration->node = node;
2121
struct_declaration->field_cnt = tea_list_length(&node->children);
22-
tea_list_init(&struct_declaration->fns);
22+
tea_list_init(&struct_declaration->funcs);
2323
tea_list_add_tail(&ctx->structs, &struct_declaration->link);
2424

2525
tea_tok_t *name = node->tok;
@@ -95,7 +95,7 @@ bool tea_interp_impl_blk(const tea_ctx_t *ctx, const tea_node_t *node)
9595
return false;
9696
}
9797

98-
const bool result = tea_decl_fn(function_node, &struct_declaration->fns);
98+
const bool result = tea_decl_fn(function_node, &struct_declaration->funcs);
9999
if (!result) {
100100
return false;
101101
}

0 commit comments

Comments
 (0)