예제 #1
0
파일: parse.c 프로젝트: CaioPaiola/watchman
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);
}
예제 #2
0
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);
}
예제 #3
0
static void dispose_expr(void *data)
{
    w_query_expr *expr = data;

    w_query_expr_delref(expr);
}