return;
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_variables_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_variables_hash_proto);
do {
var = nxt_lvlhsh_each(&node->scope->variables, &lhe);
}
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_object_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_object_hash_proto);
hash = &args[1].data.u.object->hash;
}
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_object_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_object_hash_proto);
for ( ;; ) {
prop = nxt_lvlhsh_each(hash, &lhe);
return NXT_ERROR;
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_variables_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_variables_hash_proto);
for ( ;; ) {
node = nxt_lvlhsh_each(&scope->references, &lhe);
n = 1;
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_variables_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_variables_hash_proto);
for ( ;; ) {
var = nxt_lvlhsh_each(&vm->variables_hash, &lhe);
return NULL;
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &njs_variables_hash_proto;
+ nxt_lvlhsh_each_init(&lhe, &njs_variables_hash_proto);
ex = export;
vm->retval.data.u.next = next;
- memset(&next->lhe, 0, sizeof(nxt_lvlhsh_each_t));
- next->lhe.proto = &njs_object_hash_proto;
+ nxt_lvlhsh_each_init(&next->lhe, &njs_object_hash_proto);
next->index = -1;
if (njs_is_array(object) && object->data.u.array->length != 0) {
}
}
- memset(&lhe, 0, sizeof(nxt_lvlhsh_each_t));
- lhe.proto = &lvlhsh_proto;
+ nxt_lvlhsh_each_init(&lhe, &lvlhsh_proto);
for (i = 0; i < n + 1; i++) {
if (nxt_lvlhsh_each(&lh, &lhe) == NULL) {