summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf_validation.c
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2022-11-20 23:15:01 +0800
committerZhidao HONG <z.hong@f5.com>2022-11-20 23:15:01 +0800
commit4735931ace321752c387dae04c8b217ef22897ee (patch)
treebb1a7a030094721d25683f999e828e7fab71c1f9 /src/nxt_conf_validation.c
parent0c9f417affcef25b2ede5aaf0967eb411a247e33 (diff)
downloadunit-4735931ace321752c387dae04c8b217ef22897ee.tar.gz
unit-4735931ace321752c387dae04c8b217ef22897ee.tar.bz2
Var: separating nxt_tstr_t from nxt_var_t.
It's for the introduction of njs support. For each option that supports native variable and JS template literals introduced next, it's unified as template string. No functional changes.
Diffstat (limited to 'src/nxt_conf_validation.c')
-rw-r--r--src/nxt_conf_validation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index 7fbe7e29..09b3be55 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -1227,8 +1227,8 @@ nxt_conf_validate(nxt_conf_validation_t *vldt)
{
nxt_int_t ret;
- vldt->var_fields = nxt_array_create(vldt->pool, 4, sizeof(nxt_var_field_t));
- if (nxt_slow_path(vldt->var_fields == NULL)) {
+ vldt->tstr_state = nxt_tstr_state_new(vldt->pool);
+ if (nxt_slow_path(vldt->tstr_state == NULL)) {
return NXT_ERROR;
}
@@ -1364,7 +1364,7 @@ nxt_conf_vldt_var(nxt_conf_validation_t *vldt, nxt_str_t *name,
{
u_char error[NXT_MAX_ERROR_STR];
- if (nxt_var_test(value, vldt->var_fields, error) != NXT_OK) {
+ if (nxt_tstr_test(vldt->tstr_state, value, error) != NXT_OK) {
return nxt_conf_vldt_error(vldt, "%s in the \"%V\" value.",
error, name);
}