Welcome! Log In Create A New Profile

Advanced

[njs] Moving common code to njs_array_iterator_args().

April 04, 2017 06:26AM
details: http://hg.nginx.org/njs/rev/a4e6f27ce598
branches:
changeset: 335:a4e6f27ce598
user: Igor Sysoev <igor@sysoev.ru>
date: Tue Apr 04 10:56:33 2017 +0300
description:
Moving common code to njs_array_iterator_args().

diffstat:

njs/njs_array.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 9d211a93c491 -r a4e6f27ce598 njs/njs_array.c
--- a/njs/njs_array.c Tue Apr 04 10:52:24 2017 +0300
+++ b/njs/njs_array.c Tue Apr 04 10:56:33 2017 +0300
@@ -1266,7 +1266,6 @@ njs_array_prototype_some(njs_vm_t *vm, n

iter = njs_vm_continuation(vm);
iter->u.cont.function = njs_array_prototype_some_continuation;
- iter->retval.data.truth = 0;

return njs_array_prototype_some_continuation(vm, args, nargs, unused);
}
@@ -1429,7 +1428,6 @@ njs_array_prototype_filter(njs_vm_t *vm,

filter = njs_vm_continuation(vm);
filter->iter.u.cont.function = njs_array_prototype_filter_continuation;
- filter->iter.retval.data.truth = 0;

filter->array = njs_array_alloc(vm, 0, NJS_ARRAY_SPARE);
if (nxt_slow_path(filter->array == NULL)) {
@@ -1490,7 +1488,6 @@ njs_array_prototype_find(njs_vm_t *vm, n

find = njs_vm_continuation(vm);
find->iter.u.cont.function = njs_array_prototype_find_continuation;
- find->iter.retval.data.truth = 0;

return njs_array_prototype_find_continuation(vm, args, nargs, unused);
}
@@ -1547,7 +1544,6 @@ njs_array_prototype_find_index(njs_vm_t

iter = njs_vm_continuation(vm);
iter->u.cont.function = njs_array_prototype_find_index_continuation;
- iter->retval.data.truth = 0;

return njs_array_prototype_find_index_continuation(vm, args, nargs, unused);
}
@@ -1770,6 +1766,7 @@ njs_array_iterator_args(njs_vm_t *vm, nj

iter = njs_vm_continuation(vm);
iter->length = args[0].data.u.array->length;
+ iter->retval.data.truth = 0;
iter->index = NJS_ARRAY_INVALID_INDEX;

return NXT_OK;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Moving common code to njs_array_iterator_args().

Igor Sysoev 478 April 04, 2017 06:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready