aboutsummaryrefslogtreecommitdiff
path: root/grid.h
diff options
context:
space:
mode:
Diffstat (limited to 'grid.h')
-rw-r--r--grid.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/grid.h b/grid.h
index e2cd3a63..7819db4d 100644
--- a/grid.h
+++ b/grid.h
@@ -74,6 +74,8 @@ grid_row_in_view(struct grid *grid, int row_no)
return row;
}
+void grid_row_uri_range_put(
+ struct row *row, int col, const char *uri, uint64_t id);
void grid_row_uri_range_add(struct row *row, struct row_uri_range range);
void grid_row_uri_range_erase(struct row *row, int start, int end);
@@ -86,14 +88,15 @@ grid_row_uri_range_destroy(struct row_uri_range *range)
static inline void
grid_row_reset_extra(struct row *row)
{
- if (likely(row->extra == NULL))
+ struct row_data *extra = row->extra;
+
+ if (likely(extra == NULL))
return;
- tll_foreach(row->extra->uri_ranges, it) {
- grid_row_uri_range_destroy(&it->item);
- tll_remove(row->extra->uri_ranges, it);
- }
+ for (size_t i = 0; i < extra->uri_ranges.count; i++)
+ grid_row_uri_range_destroy(&extra->uri_ranges.v[i]);
+ free(extra->uri_ranges.v);
- free(row->extra);
+ free(extra);
row->extra = NULL;
}