added ctrie.h, just initial one;

ctrie
Alexander Vdolainen 9 years ago
parent af2c8aca25
commit c7349c628d

@ -0,0 +1,42 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/*
* cas.c
* Copyright (C) 2015 Alexander Vdolainen <avdolainen@gmail.com>
*
* libtdata is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* libtdata is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
*/
#ifndef __TDATA_CTRIE_H__
#define __TDATA_CTRIE_H__
#include "../config.h"
/* flags */
#define CTRIE_FLAG_RO (1 << 1)
/* structure Ctrie (flags is also underlying node type) */
typedef struct __ctrie_type {
int flags;
void **root;
}__attribute__((packed)) ctrie_t;
/* structure SNode (key-value node) */
typedef struct __ctrie_snode {
ct_key_t key;
void *value;
}__attribute__((packed)) ct_snode_t;
#endif /* __TDATA_CTRIE_H__ */
Loading…
Cancel
Save