/* Table */ ret_t cherokee_resolv_cache_init (cherokee_resolv_cache_t *resolv) { ret_t ret; ret = cherokee_avl_init (&resolv->table); if (unlikely (ret != ret_ok)) return ret; ret = cherokee_avl_set_case (&resolv->table, true); if (unlikely (ret != ret_ok)) return ret; CHEROKEE_RWLOCK_INIT (&resolv->lock, NULL); return ret_ok; }
ret_t cherokee_avl_r_init (cherokee_avl_r_t *avl_r) { ret_t ret; CHEROKEE_NEW_STRUCT(n, avl_r_priv); ret = cherokee_avl_init (&avl_r->avl); if (ret != ret_ok) return ret; avl_r->priv = n; CHEROKEE_RWLOCK_INIT (AVL_R_LOCK(avl_r), NULL); return ret_ok; }
ret_t cherokee_regex_table_new (cherokee_regex_table_t **table) { CHEROKEE_NEW_STRUCT (n, regex_table); /* Init */ CHEROKEE_RWLOCK_INIT (&n->rwlock, NULL); cherokee_avl_init (&n->cache); /* Return the new object */ *table = n; return ret_ok; }