[njs] Saving hash key to result for each() function in level hash.

Alexander Borisov alexander.borisov at nginx.com
Thu Apr 18 16:10:16 UTC 2019


details:   https://hg.nginx.org/njs/rev/91a74d5ffc5d
branches:  
changeset: 904:91a74d5ffc5d
user:      Alexander Borisov <alexander.borisov at nginx.com>
date:      Mon Apr 08 19:01:56 2019 +0300
description:
Saving hash key to result for each() function in level hash.

diffstat:

 nxt/nxt_lvlhsh.c |  1 +
 nxt/nxt_lvlhsh.h |  1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 664d366b515a -r 91a74d5ffc5d nxt/nxt_lvlhsh.c
--- a/nxt/nxt_lvlhsh.c	Thu Apr 18 18:14:56 2019 +0300
+++ b/nxt/nxt_lvlhsh.c	Mon Apr 08 19:01:56 2019 +0300
@@ -842,6 +842,7 @@ nxt_lvlhsh_bucket_each(nxt_lvlhsh_each_t
     } while (nxt_lvlhsh_free_entry(bucket));
 
     value = nxt_lvlhsh_entry_value(bucket);
+    lhe->key_hash = nxt_lvlhsh_entry_key(bucket);
 
     lhe->entries--;
 
diff -r 664d366b515a -r 91a74d5ffc5d nxt/nxt_lvlhsh.h
--- a/nxt/nxt_lvlhsh.h	Thu Apr 18 18:14:56 2019 +0300
+++ b/nxt/nxt_lvlhsh.h	Mon Apr 08 19:01:56 2019 +0300
@@ -171,6 +171,7 @@ typedef struct {
     uint32_t                  current;
     uint32_t                  entry;
     uint32_t                  entries;
+    uint32_t                  key_hash;
 } nxt_lvlhsh_each_t;
 
 


More information about the nginx-devel mailing list