[njs] Added njs_value_function_set().
Dmitry Volyntsev
xeioex at nginx.com
Thu Dec 8 02:13:54 UTC 2022
details: https://hg.nginx.org/njs/rev/f2ab76784741
branches:
changeset: 2010:f2ab76784741
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Wed Dec 07 18:11:55 2022 -0800
description:
Added njs_value_function_set().
diffstat:
src/njs.h | 2 ++
src/njs_value.c | 7 +++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diffs (29 lines):
diff -r a2a24c4b2541 -r f2ab76784741 src/njs.h
--- a/src/njs.h Wed Dec 07 18:11:54 2022 -0800
+++ b/src/njs.h Wed Dec 07 18:11:55 2022 -0800
@@ -457,6 +457,8 @@ NJS_EXPORT void njs_value_null_set(njs_v
NJS_EXPORT void njs_value_invalid_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);
+NJS_EXPORT void njs_value_function_set(njs_value_t *value,
+ njs_function_t *function);
NJS_EXPORT uint8_t njs_value_bool(const njs_value_t *value);
NJS_EXPORT double njs_value_number(const njs_value_t *value);
diff -r a2a24c4b2541 -r f2ab76784741 src/njs_value.c
--- a/src/njs_value.c Wed Dec 07 18:11:54 2022 -0800
+++ b/src/njs_value.c Wed Dec 07 18:11:55 2022 -0800
@@ -404,6 +404,13 @@ njs_value_number_set(njs_value_t *value,
}
+void
+njs_value_function_set(njs_value_t *value, njs_function_t *function)
+{
+ njs_set_function(value, function);
+}
+
+
uint8_t
njs_value_bool(const njs_value_t *value)
{
More information about the nginx-devel
mailing list