diff options
author | Zhidao HONG <z.hong@f5.com> | 2022-06-15 14:27:50 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2022-06-15 14:27:50 +0800 |
commit | 6a8081d71e805b12d0f7fd32ce72d60babadfc85 (patch) | |
tree | 39e5475df3118622289e0e334ad6a35f873786e0 | |
parent | 862f51bcd834d58fadc322720107be64ba0b70b1 (diff) | |
download | unit-6a8081d71e805b12d0f7fd32ce72d60babadfc85.tar.gz unit-6a8081d71e805b12d0f7fd32ce72d60babadfc85.tar.bz2 |
Var: relocated nxt_var_is_const() and nxt_var_raw().
No functional changes.
-rw-r--r-- | src/nxt_var.c | 30 | ||||
-rw-r--r-- | src/nxt_var.h | 6 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/nxt_var.c b/src/nxt_var.c index 458ba678..a7cbb898 100644 --- a/src/nxt_var.c +++ b/src/nxt_var.c @@ -91,21 +91,6 @@ static uint32_t nxt_var_count; static nxt_var_handler_t *nxt_var_index; -void -nxt_var_raw(nxt_var_t *var, nxt_str_t *str) -{ - str->length = var->length; - str->start = nxt_var_raw_start(var); -} - - -nxt_bool_t -nxt_var_is_const(nxt_var_t *var) -{ - return (var->vars == 0); -} - - static nxt_int_t nxt_var_hash_test(nxt_lvlhsh_query_t *lhq, void *data) { @@ -420,6 +405,21 @@ nxt_var_next_part(u_char *start, size_t length, nxt_str_t *part, } +inline void +nxt_var_raw(nxt_var_t *var, nxt_str_t *str) +{ + str->length = var->length; + str->start = nxt_var_raw_start(var); +} + + +inline nxt_bool_t +nxt_var_is_const(nxt_var_t *var) +{ + return (var->vars == 0); +} + + nxt_int_t nxt_var_query_init(nxt_var_query_t **query_p, void *ctx, nxt_mp_t *mp) { diff --git a/src/nxt_var.h b/src/nxt_var.h index 7fef0278..1322d507 100644 --- a/src/nxt_var.h +++ b/src/nxt_var.h @@ -29,14 +29,14 @@ nxt_is_var(nxt_str_t *str) } -void nxt_var_raw(nxt_var_t *var, nxt_str_t *str); -nxt_bool_t nxt_var_is_const(nxt_var_t *var); - nxt_int_t nxt_var_register(nxt_var_decl_t *decl, size_t n); nxt_int_t nxt_var_index_init(void); nxt_var_t *nxt_var_compile(nxt_str_t *str, nxt_mp_t *mp, nxt_bool_t strz); nxt_int_t nxt_var_test(nxt_str_t *str, u_char *error); +void nxt_var_raw(nxt_var_t *var, nxt_str_t *str); +nxt_bool_t nxt_var_is_const(nxt_var_t *var); + nxt_int_t nxt_var_query_init(nxt_var_query_t **query_p, void *ctx, nxt_mp_t *mp); void nxt_var_query(nxt_task_t *task, nxt_var_query_t *query, |