summaryrefslogtreecommitdiff
path: root/src/utils/chunkarray.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-30 16:35:19 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-30 16:35:19 +0000
commitaa0aa44aaab4b0693400dc4307822ac493014224 (patch)
tree0fbce8307517d84a2f1eb1a295778e8dd6fff6d4 /src/utils/chunkarray.h
parent7712c61effc3ef39d0b9eaf060049d11441884bf (diff)
downloadlibparserutils-aa0aa44aaab4b0693400dc4307822ac493014224.tar.gz
libparserutils-aa0aa44aaab4b0693400dc4307822ac493014224.tar.bz2
New datastructures:
+ Chunked array + Hash table (open addressing) Constify parameter to parserutils_stack_push svn path=/trunk/libparserutils/; revision=5850
Diffstat (limited to 'src/utils/chunkarray.h')
-rw-r--r--src/utils/chunkarray.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/utils/chunkarray.h b/src/utils/chunkarray.h
new file mode 100644
index 0000000..4ee98cd
--- /dev/null
+++ b/src/utils/chunkarray.h
@@ -0,0 +1,26 @@
+/*
+ * 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_chunkarray_h_
+#define parserutils_utils_chunkarray_h_
+
+#include <parserutils/errors.h>
+#include <parserutils/functypes.h>
+
+struct parserutils_chunkarray;
+typedef struct parserutils_chunkarray parserutils_chunkarray;
+
+parserutils_error parserutils_chunkarray_create(parserutils_alloc alloc,
+ void *pw, parserutils_chunkarray **array);
+parserutils_error parserutils_chunkarray_destroy(parserutils_chunkarray *array);
+
+parserutils_error parserutils_chunkarray_insert(parserutils_chunkarray *array,
+ const void *data, size_t len,
+ const void **inserted);
+
+#endif
+