Variables refactoring.

This commit is to reimplement the variables with an unknown field
such as $header_{name} to make the parsing more generic,
it's a preparation for supporting response header variables.
This commit is contained in:
Zhidao HONG
2023-06-19 16:29:22 +08:00
parent 18d3637e4b
commit c61ccec7b4
6 changed files with 212 additions and 188 deletions

View File

@@ -13,14 +13,14 @@ typedef struct nxt_tstr_s nxt_tstr_t;
typedef struct nxt_tstr_query_s nxt_tstr_query_t;
typedef struct {
struct nxt_tstr_state_s {
nxt_mp_t *pool;
nxt_array_t *var_fields;
nxt_array_t *var_refs;
#if (NXT_HAVE_NJS)
nxt_js_conf_t *jcf;
#endif
uint8_t test; /* 1 bit */
} nxt_tstr_state_t;
};
typedef struct {