> {
> - GList *node;
> - foreach_list(node, *list)
> - g_slice_free(GtkTreeIter, node->data);
> - g_list_free(*list);
> - g_slice_free1(sizeof *list, list);
> + TreeSearchData user_data = {-1, line, TRUE};
> +
> + /* search parent candidates for the one with the nearest
> + * line number which is lower than the tag's line number */
> + g_tree_search(tree, (GCompareFunc)tree_search_func, &user_data);
> + parent_search = g_tree_lookup(tree,
> GINT_TO_POINTER(user_data.found_line));
same, shouldn't this be only done if search matched?
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/797/files#r48275413