diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2022-06-02 16:51:49 +0400 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2022-06-02 16:51:49 +0400 |
commit | d9fddee1dbfc1f5d49c8f40386289d7188030952 (patch) | |
tree | 842a62b343ac33eba10e7a426a10b55bb1c46aed /src/nxt_conf.h | |
parent | 420395ee2e7cd464e157c49bea3d74f15bf25f30 (diff) | |
parent | 0d48fe73c4450901622373e35f6ff3a944ec13d6 (diff) | |
download | unit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.gz unit-d9fddee1dbfc1f5d49c8f40386289d7188030952.tar.bz2 |
Merged with the default branch.1.27.0-1
Diffstat (limited to 'src/nxt_conf.h')
-rw-r--r-- | src/nxt_conf.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nxt_conf.h b/src/nxt_conf.h index 8b3565fd..cfbc5991 100644 --- a/src/nxt_conf.h +++ b/src/nxt_conf.h @@ -87,6 +87,8 @@ NXT_EXPORT nxt_conf_value_t *nxt_conf_next_object_member( nxt_conf_value_t *value, nxt_str_t *name, uint32_t *next); NXT_EXPORT nxt_conf_value_t *nxt_conf_get_array_element(nxt_conf_value_t *value, uint32_t index); +NXT_EXPORT nxt_conf_value_t *nxt_conf_get_array_element_or_itself( + nxt_conf_value_t *value, uint32_t index); NXT_EXPORT nxt_int_t nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, nxt_uint_t n, void *data); @@ -115,7 +117,7 @@ nxt_int_t nxt_conf_validate(nxt_conf_validation_t *vldt); NXT_EXPORT void nxt_conf_get_string(nxt_conf_value_t *value, nxt_str_t *str); NXT_EXPORT void nxt_conf_set_string(nxt_conf_value_t *value, nxt_str_t *str); NXT_EXPORT nxt_int_t nxt_conf_set_string_dup(nxt_conf_value_t *value, - nxt_mp_t *mp, nxt_str_t *str); + nxt_mp_t *mp, const nxt_str_t *str); NXT_EXPORT double nxt_conf_get_number(nxt_conf_value_t *value); NXT_EXPORT uint8_t nxt_conf_get_boolean(nxt_conf_value_t *value); @@ -139,6 +141,8 @@ void nxt_conf_set_element(nxt_conf_value_t *array, nxt_uint_t index, nxt_int_t nxt_conf_set_element_string_dup(nxt_conf_value_t *array, nxt_mp_t *mp, nxt_uint_t index, nxt_str_t *value); NXT_EXPORT nxt_uint_t nxt_conf_array_elements_count(nxt_conf_value_t *value); +NXT_EXPORT nxt_uint_t nxt_conf_array_elements_count_or_1( + nxt_conf_value_t *value); void nxt_conf_array_qsort(nxt_conf_value_t *value, int (*compare)(const void *, const void *)); |