From: Igor Sysoev Date: Thu, 4 Aug 2016 13:31:48 +0000 (+0300) Subject: The lvlhsh unit test has been updated after nxt_str_t changes. X-Git-Tag: 0.1.1~16 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=87dba38ee8fbb9863eae8e94aec2da844d090607;p=njs.git The lvlhsh unit test has been updated after nxt_str_t changes. --- diff --git a/nxt/test/lvlhsh_unit_test.c b/nxt/test/lvlhsh_unit_test.c index 46ece5bc..27d6b692 100644 --- a/nxt/test/lvlhsh_unit_test.c +++ b/nxt/test/lvlhsh_unit_test.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ static nxt_int_t lvlhsh_unit_test_key_test(nxt_lvlhsh_query_t *lhq, void *data) { - if (*(uintptr_t *) lhq->key.data == (uintptr_t) data) { + if (*(uintptr_t *) lhq->key.start == (uintptr_t) data) { return NXT_OK; } @@ -58,8 +59,8 @@ lvlhsh_unit_test_add(nxt_lvlhsh_t *lh, const nxt_lvlhsh_proto_t *proto, lhq.key_hash = key; lhq.replace = 0; - lhq.key.len = sizeof(uintptr_t); - lhq.key.data = (u_char *) &key; + lhq.key.length = sizeof(uintptr_t); + lhq.key.start = (u_char *) &key; lhq.value = (void *) key; lhq.proto = proto; lhq.pool = pool; @@ -86,8 +87,8 @@ lvlhsh_unit_test_get(nxt_lvlhsh_t *lh, const nxt_lvlhsh_proto_t *proto, nxt_lvlhsh_query_t lhq; lhq.key_hash = key; - lhq.key.len = sizeof(uintptr_t); - lhq.key.data = (u_char *) &key; + lhq.key.length = sizeof(uintptr_t); + lhq.key.start = (u_char *) &key; lhq.proto = proto; if (nxt_lvlhsh_find(lh, &lhq) == NXT_OK) { @@ -112,8 +113,8 @@ lvlhsh_unit_test_delete(nxt_lvlhsh_t *lh, const nxt_lvlhsh_proto_t *proto, nxt_lvlhsh_query_t lhq; lhq.key_hash = key; - lhq.key.len = sizeof(uintptr_t); - lhq.key.data = (u_char *) &key; + lhq.key.length = sizeof(uintptr_t); + lhq.key.start = (u_char *) &key; lhq.proto = proto; lhq.pool = pool;