diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-10 00:16:42 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-10 00:16:42 +0000 |
commit | 419e9a6766e9676fc1905291eeccaf655c8d5b09 (patch) | |
tree | 33f02eaf082449ca4f8b330c19c96138f5537e7c /include/parserutils/utils | |
parent | 2777a04ed2ba4fd36138b991d66a32a283361f7e (diff) | |
download | libparserutils-419e9a6766e9676fc1905291eeccaf655c8d5b09.tar.gz libparserutils-419e9a6766e9676fc1905291eeccaf655c8d5b09.tar.bz2 |
Have some generic dictionary implementation.
Even comes with testcases, which is nice.
svn path=/trunk/libparserutils/; revision=4138
Diffstat (limited to 'include/parserutils/utils')
-rw-r--r-- | include/parserutils/utils/dict.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/parserutils/utils/dict.h b/include/parserutils/utils/dict.h new file mode 100644 index 0000000..43c96cb --- /dev/null +++ b/include/parserutils/utils/dict.h @@ -0,0 +1,28 @@ +/* + * This file is part of LibParserUtils. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2008 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#ifndef parserutils_utils_dict_h_ +#define parserutils_utils_dict_h_ + +#include <parserutils/errors.h> +#include <parserutils/functypes.h> + +struct parserutils_dict_entry; +typedef struct parserutils_dict_entry parserutils_dict_entry; + +struct parserutils_dict; +typedef struct parserutils_dict parserutils_dict; + +parserutils_dict *parserutils_dict_create(parserutils_alloc alloc, void *pw); +void parserutils_dict_destroy(parserutils_dict *dict); + +parserutils_error parserutils_dict_insert(parserutils_dict *dict, + const uint8_t *data, size_t len, + const parserutils_dict_entry **result); + +#endif + |