}
}
-/** Cleanup function for cursor. */
-static void treesit_traverse_cleanup_cursor(void *cursor)
+/* Cleanup function for cursor. */
+static void
+treesit_traverse_cleanup_cursor(void *cursor)
{
ts_tree_cursor_delete ((TSTreeCursor *) cursor);
}
return_value = make_treesit_node (parser, node);
}
- unbind_to (count, Qnil);
-
- ts_tree_cursor_delete (&cursor);
- return return_value;
+ return unbind_to (count, return_value);
}
DEFUN ("treesit-search-forward",
return_value = make_treesit_node (parser, node);
}
- unbind_to (count, Qnil);
-
- ts_tree_cursor_delete (&cursor);
- return return_value;
+ return unbind_to (count, return_value);
}
/* Recursively traverse the tree under CURSOR, and append the result
unbind_to (count, Qnil);
- ts_tree_cursor_delete (&cursor);
Fsetcdr (parent, Fnreverse (Fcdr (parent)));
if (NILP (Fcdr (parent)))
return Qnil;