summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_lvlhsh.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-03-29 16:35:32 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-03-29 16:35:32 +0300
commitaad7752527faf674bcb01408e997769ba48756d7 (patch)
tree007a63d8b391ea39a1ccceb1a46b14f822e4fd29 /src/nxt_lvlhsh.h
parent8a4c8d64b264f5f8eb9951f26ee1af3ddd1c01f6 (diff)
downloadunit-aad7752527faf674bcb01408e997769ba48756d7.tar.gz
unit-aad7752527faf674bcb01408e997769ba48756d7.tar.bz2
nxt_lvlhsh_retrieve().
Diffstat (limited to 'src/nxt_lvlhsh.h')
-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 5f180797..07342d44 100644
--- a/src/nxt_lvlhsh.h
+++ b/src/nxt_lvlhsh.h
@@ -173,6 +173,15 @@ NXT_EXPORT void *nxt_lvlhsh_each(nxt_lvlhsh_t *lh, nxt_lvlhsh_each_t *le);
NXT_EXPORT void *nxt_lvlhsh_peek(nxt_lvlhsh_t *lh,
const nxt_lvlhsh_proto_t *proto);
+/*
+ * nxt_lvlhsh_retrieve() is used to iterate over a lvlhsh during the lvlhsh
+ * destruction. As opposed to nxt_lvlhsh_peek() the returned hash element
+ * is deleted from the lvlhsh. The function returns NULL if there is no
+ * more elements in the lvlhsh.
+ */
+NXT_EXPORT void *nxt_lvlhsh_retrieve(nxt_lvlhsh_t *lh,
+ const nxt_lvlhsh_proto_t *proto, void *pool);
+
NXT_EXPORT void *nxt_lvlhsh_alloc(void *data, size_t size);
NXT_EXPORT void nxt_lvlhsh_free(void *data, void *p);