blob: 92f0236d0cd3378bf48060e6c118fc7723a6f076 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* 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_hash_h_
#define parserutils_utils_hash_h_
#include <parserutils/errors.h>
#include <parserutils/functypes.h>
typedef struct parserutils_hash_entry {
uint16_t len;
const uint8_t data[];
} parserutils_hash_entry;
struct parserutils_hash;
typedef struct parserutils_hash parserutils_hash;
parserutils_error parserutils_hash_create(parserutils_alloc alloc, void *pw,
parserutils_hash **hash);
parserutils_error parserutils_hash_destroy(parserutils_hash *hash);
parserutils_error parserutils_hash_insert(parserutils_hash *hash,
const uint8_t *data, uint16_t len,
const parserutils_hash_entry **inserted);
#endif
|