[njs] Added njs_value_null_set().

Dmitry Volyntsev xeioex at nginx.com
Mon Jan 11 19:54:04 UTC 2021


details:   https://hg.nginx.org/njs/rev/1b99785e0711
branches:  
changeset: 1591:1b99785e0711
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Mon Jan 11 19:53:09 2021 +0000
description:
Added njs_value_null_set().

diffstat:

 src/njs.h       |  1 +
 src/njs_value.c |  7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r dbc81c9d4e46 -r 1b99785e0711 src/njs.h
--- a/src/njs.h	Mon Jan 11 19:53:09 2021 +0000
+++ b/src/njs.h	Mon Jan 11 19:53:09 2021 +0000
@@ -375,6 +375,7 @@ NJS_EXPORT void njs_vm_value_error_set(n
 NJS_EXPORT void njs_vm_memory_error(njs_vm_t *vm);
 
 NJS_EXPORT void njs_value_undefined_set(njs_value_t *value);
+NJS_EXPORT void njs_value_null_set(njs_value_t *value);
 NJS_EXPORT void njs_value_boolean_set(njs_value_t *value, int yn);
 NJS_EXPORT void njs_value_number_set(njs_value_t *value, double num);
 
diff -r dbc81c9d4e46 -r 1b99785e0711 src/njs_value.c
--- a/src/njs_value.c	Mon Jan 11 19:53:09 2021 +0000
+++ b/src/njs_value.c	Mon Jan 11 19:53:09 2021 +0000
@@ -386,6 +386,13 @@ njs_value_undefined_set(njs_value_t *val
 
 
 void
+njs_value_null_set(njs_value_t *value)
+{
+    njs_set_null(value);
+}
+
+
+void
 njs_value_boolean_set(njs_value_t *value, int yn)
 {
     njs_set_boolean(value, yn);


More information about the nginx-devel mailing list