[njs] Renamed njs_value_is_true into njs_value_is_boolean.
Dmitry Volyntsev
xeioex at nginx.com
Fri Mar 30 12:47:11 UTC 2018
details: http://hg.nginx.org/njs/rev/be43fdd9579e
branches:
changeset: 476:be43fdd9579e
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Fri Mar 30 15:46:40 2018 +0300
description:
Renamed njs_value_is_true into njs_value_is_boolean.
diffstat:
njs/njs_vm.c | 11 +++++++++--
njs/njscript.h | 3 ++-
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r 6343166cb0ea -r be43fdd9579e njs/njs_vm.c
--- a/njs/njs_vm.c Fri Mar 30 15:46:39 2018 +0300
+++ b/njs/njs_vm.c Fri Mar 30 15:46:40 2018 +0300
@@ -3691,6 +3691,13 @@ memory_error:
}
+nxt_noinline uint8_t
+njs_value_bool(njs_value_t *value)
+{
+ return value->data.truth;
+}
+
+
nxt_noinline double
njs_value_number(njs_value_t *value)
{
@@ -3720,9 +3727,9 @@ njs_value_is_void(njs_value_t *value)
nxt_noinline nxt_int_t
-njs_value_is_true(njs_value_t *value)
+njs_value_is_boolean(njs_value_t *value)
{
- return njs_is_true(value);
+ return njs_is_boolean(value);
}
diff -r 6343166cb0ea -r be43fdd9579e njs/njscript.h
--- a/njs/njscript.h Fri Mar 30 15:46:39 2018 +0300
+++ b/njs/njscript.h Fri Mar 30 15:46:40 2018 +0300
@@ -182,12 +182,13 @@ NXT_EXPORT void njs_value_number_set(njs
NXT_EXPORT void njs_value_error_set(njs_vm_t *vm, njs_value_t *value,
const char *fmt, ...);
+NXT_EXPORT uint8_t njs_value_bool(njs_value_t *value);
NXT_EXPORT double njs_value_number(njs_value_t *value);
NXT_EXPORT void *njs_value_data(njs_value_t *value);
NXT_EXPORT njs_function_t *njs_value_function(njs_value_t *value);
NXT_EXPORT nxt_int_t njs_value_is_void(njs_value_t *value);
-NXT_EXPORT nxt_int_t njs_value_is_true(njs_value_t *value);
+NXT_EXPORT nxt_int_t njs_value_is_boolean(njs_value_t *value);
NXT_EXPORT nxt_int_t njs_value_is_number(njs_value_t *value);
NXT_EXPORT nxt_int_t njs_value_is_string(njs_value_t *value);
NXT_EXPORT nxt_int_t njs_value_is_object(njs_value_t *value);
More information about the nginx-devel
mailing list