Continue to norm stuff and remove useless stuff

This commit is contained in:
Maieul BOYER 2024-09-02 18:33:13 +02:00
parent 62ac9f3813
commit 1a40f20f0d
No known key found for this signature in database
9 changed files with 164 additions and 195 deletions

View file

@ -68,7 +68,7 @@ t_stack_version ts_stack__add_version(t_stack *self,
array_push(&self->heads, head);
stack_node_retain(node);
if (head.last_external_token)
ts_subtree_retain(head.last_external_token);
(head.last_external_token->ref_count++);
return ((t_stack_version)(self->heads.size - 1));
}
@ -103,7 +103,7 @@ void ts_stack_set_last_external_token(t_stack *self, t_stack_version version,
head = array_get(&self->heads, version);
if (token)
ts_subtree_retain(token);
(token->ref_count++);
if (head->last_external_token)
ts_subtree_release(head->last_external_token);
head->last_external_token = token;