Simplify allocation-recording in test suite using new ts_set_allocator API

This commit is contained in:
Max Brunsfeld 2021-12-30 16:09:07 -08:00
parent e01ea9ff51
commit 622359b400
19 changed files with 245 additions and 254 deletions

View file

@ -722,7 +722,6 @@ void ts_stack_clear(Stack *self) {
bool ts_stack_print_dot_graph(Stack *self, const TSLanguage *language, FILE *f) {
array_reserve(&self->iterators, 32);
bool was_recording_allocations = ts_toggle_allocation_recording(false);
if (!f) f = stderr;
fprintf(f, "digraph stack {\n");
@ -851,7 +850,6 @@ bool ts_stack_print_dot_graph(Stack *self, const TSLanguage *language, FILE *f)
fprintf(f, "}\n");
array_delete(&visited_nodes);
ts_toggle_allocation_recording(was_recording_allocations);
return true;
}