summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_lvlhsh.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-03-29 16:35:26 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-03-29 16:35:26 +0300
commit8a4c8d64b264f5f8eb9951f26ee1af3ddd1c01f6 (patch)
tree5975dadffa04015c66b6168f73a70796a0261fe1 /src/nxt_lvlhsh.h
parentbd451a50a9ca3bf9a422c4e8b8bc8bd6c126a1b7 (diff)
downloadunit-8a4c8d64b264f5f8eb9951f26ee1af3ddd1c01f6.tar.gz
unit-8a4c8d64b264f5f8eb9951f26ee1af3ddd1c01f6.tar.bz2
nxt_lvlhsh_peek().
Diffstat (limited to '')
-rw-r--r--src/nxt_lvlhsh.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nxt_lvlhsh.h b/src/nxt_lvlhsh.h
index 01014124..5f180797 100644
--- a/src/nxt_lvlhsh.h
+++ b/src/nxt_lvlhsh.h
@@ -164,6 +164,15 @@ typedef struct {
NXT_EXPORT void *nxt_lvlhsh_each(nxt_lvlhsh_t *lh, nxt_lvlhsh_each_t *le);
+/*
+ * nxt_lvlhsh_peek() is used to iterate over a lvlhsh during the lvlhsh
+ * destruction. The returned hash element should be deleted from the lvlhsh,
+ * otherwise it will be returned again by the next nxt_lvlhsh_peek() call.
+ * The function returns NULL if there is no more elements in the lvlhsh.
+ */
+NXT_EXPORT void *nxt_lvlhsh_peek(nxt_lvlhsh_t *lh,
+ const nxt_lvlhsh_proto_t *proto);
+
NXT_EXPORT void *nxt_lvlhsh_alloc(void *data, size_t size);
NXT_EXPORT void nxt_lvlhsh_free(void *data, void *p);