void w_query_delref(w_query *query) { uint32_t i; if (!w_refcnt_del(&query->refcnt)) { return; } for (i = 0; i < query->npaths; i++) { if (query->paths[i].name) { w_string_delref(query->paths[i].name); } } free(query->paths); if (query->since_spec) { w_clockspec_free(query->since_spec); } if (query->expr) { w_query_expr_delref(query->expr); } free(query); }
static void dispose_list(void *data) { struct w_expr_list *list = data; size_t i; for (i = 0; i < list->num; i++) { if (list->exprs[i]) { w_query_expr_delref(list->exprs[i]); } } free(list->exprs); free(list); }
static void dispose_expr(void *data) { w_query_expr *expr = data; w_query_expr_delref(expr); }