Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
void w_query_expr_delref(w_query_expr *expr)
{
  if (!w_refcnt_del(&expr->refcnt)) {
    return;
  }
  if (expr->dispose) {
    expr->dispose(expr->data);
  }
  free(expr);
}
Ejemplo n.º 3
0
void w_string_delref(w_string_t *str)
{
  if (!w_refcnt_del(&str->refcnt)) return;
  if (str->slice) w_string_delref(str->slice);
  free(str);
}