aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-04 17:31:33 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-04 17:31:33 -0400
commit73000498674ea2a72204c0e137c45bdfa7afd524 (patch)
treeeff10c278e5ee932e0d2a7f410a144f875ffdea3 /compile.c
parent7fd74553f8df574740ab930491baade7223fe5c2 (diff)
Switch to TABLE_INCREF
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 1c258777..9f91161c 100644
--- a/compile.c
+++ b/compile.c
@@ -2172,7 +2172,7 @@ CORD compile(env_t *env, ast_t *ast)
if (ptr->pointed->tag == ArrayType) {
return CORD_all("({ array_t *arr = ", compile(env, indexing->indexed), "; ARRAY_INCREF(*arr); *arr; })");
} else if (ptr->pointed->tag == TableType) {
- return CORD_all("({ table_t *t = ", compile(env, indexing->indexed), "; Table$mark_copy_on_write(t); *t; })");
+ return CORD_all("({ table_t *t = ", compile(env, indexing->indexed), "; TABLE_INCREF(*t); *t; })");
} else {
return CORD_all("*(", compile(env, indexing->indexed), ")");
}