summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2022-08-29 14:27:09 +0800
committerValentin Bartenev <vbart@nginx.com>2022-08-29 14:27:09 +0800
commitce26dd729e6842c9ec8cc83bf091167e4c50a1ec (patch)
treed215198f765faeefd46253bd118e8d058d31fd1e /src/nxt_conf.c
parentf2bab1b1be658e3456aa1cec84a1879d4b01577e (diff)
downloadunit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.gz
unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.bz2
Implemented basic statistics API.
Diffstat (limited to 'src/nxt_conf.c')
-rw-r--r--src/nxt_conf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index a44b8c75..c6312f3d 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -278,6 +278,20 @@ nxt_conf_set_member(nxt_conf_value_t *object, nxt_str_t *name,
}
+nxt_int_t
+nxt_conf_set_member_dup(nxt_conf_value_t *object, nxt_mp_t *mp, nxt_str_t *name,
+ nxt_conf_value_t *value, uint32_t index)
+{
+ nxt_conf_object_member_t *member;
+
+ member = &object->u.object->members[index];
+
+ member->value = *value;
+
+ return nxt_conf_set_string_dup(&member->name, mp, name);
+}
+
+
void
nxt_conf_set_member_string(nxt_conf_value_t *object, nxt_str_t *name,
nxt_str_t *value, uint32_t index)