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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user