]> git.kaiwu.me - njs.git/commitdiff
Saving hash key to result for each() function in level hash.
authorAlexander Borisov <alexander.borisov@nginx.com>
Mon, 8 Apr 2019 16:01:56 +0000 (19:01 +0300)
committerAlexander Borisov <alexander.borisov@nginx.com>
Mon, 8 Apr 2019 16:01:56 +0000 (19:01 +0300)
nxt/nxt_lvlhsh.c
nxt/nxt_lvlhsh.h

index 0b554e5526dddfb9149fde7db99f2f0a403c8b9d..9cbb704e53d6e4ec66921303fc219adb017dbb88 100644 (file)
@@ -842,6 +842,7 @@ nxt_lvlhsh_bucket_each(nxt_lvlhsh_each_t *lhe)
     } while (nxt_lvlhsh_free_entry(bucket));
 
     value = nxt_lvlhsh_entry_value(bucket);
+    lhe->key_hash = nxt_lvlhsh_entry_key(bucket);
 
     lhe->entries--;
 
index 7bcc8314bee7be57ac63e1e158f8dbb4a35458d4..70f5a5b6f5dd07fa4e4128146d66ce8394a67af8 100644 (file)
@@ -171,6 +171,7 @@ typedef struct {
     uint32_t                  current;
     uint32_t                  entry;
     uint32_t                  entries;
+    uint32_t                  key_hash;
 } nxt_lvlhsh_each_t;