aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-08 13:20:38 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-08 13:20:38 -0400
commitf78cd6357acf7bd8eae6687f2530201acd522329 (patch)
tree1cb980a4dcfbd5bad3c7237a5940a103f9d2d1a3 /compile.c
parentc045c54309dfaa7bb11f97dc3f36c595736eca3b (diff)
Change table removal function to use values instead of references
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index a141302b..3a632afe 100644
--- a/compile.c
+++ b/compile.c
@@ -1976,8 +1976,8 @@ CORD compile(env_t *env, ast_t *ast)
compile_type_info(env, self_value_t), ")");
} else if (streq(call->name, "remove")) {
CORD self = compile_to_pointer_depth(env, call->self, 1, false);
- arg_t *arg_spec = new(arg_t, .name="key", .type=Type(PointerType, .pointed=table->key_type, .is_stack=true, .is_readonly=true));
- return CORD_all("Table$remove(", self, ", ", compile_arguments(env, ast, arg_spec, call->args), ", ",
+ arg_t *arg_spec = new(arg_t, .name="key", .type=table->key_type);
+ return CORD_all("Table$remove_value(", self, ", ", compile_arguments(env, ast, arg_spec, call->args), ", ",
compile_type_info(env, self_value_t), ")");
} else if (streq(call->name, "clear")) {
CORD self = compile_to_pointer_depth(env, call->self, 1, false);