[njs] Refactored njs_function_frame_free.
Dmitry Volyntsev
xeioex at nginx.com
Wed Jan 9 15:25:12 UTC 2019
details: https://hg.nginx.org/njs/rev/0e7fc17f6071
branches:
changeset: 715:0e7fc17f6071
user: hongzhidao <hongzhidao at gmail.com>
date: Mon Jan 07 17:42:00 2019 +0800
description:
Refactored njs_function_frame_free.
diffstat:
njs/njs_vm.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r d0ba2a63eb5a -r 0e7fc17f6071 njs/njs_vm.c
--- a/njs/njs_vm.c Mon Jan 07 17:40:48 2019 +0800
+++ b/njs/njs_vm.c Mon Jan 07 17:42:00 2019 +0800
@@ -38,7 +38,7 @@ static njs_ret_t njs_vmcode_continuation
njs_value_t *invld2);
static njs_native_frame_t *
njs_function_previous_frame(njs_native_frame_t *frame);
-static njs_ret_t njs_function_frame_free(njs_vm_t *vm,
+static void njs_function_frame_free(njs_vm_t *vm,
njs_native_frame_t *frame);
static void njs_vm_trap(njs_vm_t *vm, njs_trap_t trap, njs_value_t *value1,
@@ -2080,7 +2080,7 @@ njs_vmcode_function_call(njs_vm_t *vm, n
frame = vm->top_frame;
vm->top_frame = njs_function_previous_frame(frame);
- (void) njs_function_frame_free(vm, frame);
+ njs_function_frame_free(vm, frame);
/*
* If a retval is in a callee arguments scope it
@@ -2398,7 +2398,9 @@ njs_vmcode_return(njs_vm_t *vm, njs_valu
vm->current = frame->return_address;
- return njs_function_frame_free(vm, &frame->native);
+ njs_function_frame_free(vm, &frame->native);
+
+ return 0;
}
@@ -2544,7 +2546,7 @@ njs_function_previous_frame(njs_native_f
}
-static njs_ret_t
+static void
njs_function_frame_free(njs_vm_t *vm, njs_native_frame_t *frame)
{
njs_native_frame_t *previous;
@@ -2562,8 +2564,6 @@ njs_function_frame_free(njs_vm_t *vm, nj
frame = previous;
} while (frame->skip);
-
- return 0;
}
More information about the nginx-devel
mailing list