root/cherokee/trunk/cherokee/avl_r.h

Revision 1131, 1.7 kB (checked in by alo, 8 months ago)

--

Line 
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* Cherokee
4  *
5  * Authors:
6  *      Alvaro Lopez Ortega <alvaro@alobbs.com>
7  *
8  * Copyright (C) 2001-2008 Alvaro Lopez Ortega
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of version 2 of the GNU General Public
12  * License as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  * USA
23  */
24
25 #if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
26 # error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
27 #endif
28
29 #ifndef CHEROKEE_AVL_R_H
30 #define CHEROKEE_AVL_R_H
31
32 #include <cherokee/avl.h>
33
34
35 CHEROKEE_BEGIN_DECLS
36
37 typedef struct {
38            cherokee_avl_t  avl;
39            void           *priv;
40 } cherokee_avl_r_t;
41
42 #define AVL_R(a) ((cherokee_avl_t *)(a))
43
44 ret_t cherokee_avl_r_init      (cherokee_avl_r_t  *avl_r);
45 ret_t cherokee_avl_r_mrproper  (cherokee_avl_r_t  *avl_r, cherokee_func_free_t free_func);
46
47 ret_t cherokee_avl_r_add       (cherokee_avl_r_t *avl_r, cherokee_buffer_t *key, void  *value);
48 ret_t cherokee_avl_r_del       (cherokee_avl_r_t *avl_r, cherokee_buffer_t *key, void **value);
49 ret_t cherokee_avl_r_get       (cherokee_avl_r_t *avl_r, cherokee_buffer_t *key, void **value);
50
51 CHEROKEE_END_DECLS
52
53 #endif /* CHEROKEE_AVL_R_H */
Note: See TracBrowser for help on using the browser.