From: hongzhidao Date: Wed, 27 Feb 2019 09:49:03 +0000 (+0800) Subject: Style. X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=4367b01360abd2d21381cce232e9c6a0cdec4447;p=njs.git Style. --- diff --git a/njs/njs_lexer_keyword.c b/njs/njs_lexer_keyword.c index 0b521563..8699191a 100644 --- a/njs/njs_lexer_keyword.c +++ b/njs/njs_lexer_keyword.c @@ -142,7 +142,7 @@ const nxt_lvlhsh_proto_t njs_keyword_hash_proto nxt_int_t -njs_lexer_keywords_init(nxt_mp_t *mcp, nxt_lvlhsh_t *hash) +njs_lexer_keywords_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash) { nxt_uint_t n; nxt_lvlhsh_query_t lhq; @@ -153,7 +153,7 @@ njs_lexer_keywords_init(nxt_mp_t *mcp, nxt_lvlhsh_t *hash) lhq.replace = 0; lhq.proto = &njs_keyword_hash_proto; - lhq.pool = mcp; + lhq.pool = mp; do { lhq.key_hash = nxt_djb_hash(keyword->name.start, keyword->name.length); diff --git a/njs/njs_parser.h b/njs/njs_parser.h index 501e806e..70af6514 100644 --- a/njs/njs_parser.h +++ b/njs/njs_parser.h @@ -310,7 +310,7 @@ typedef struct { njs_token_t njs_lexer_token(njs_lexer_t *lexer); void njs_lexer_rollback(njs_lexer_t *lexer); njs_token_t njs_lexer_peek_token(njs_lexer_t *lexer); -nxt_int_t njs_lexer_keywords_init(nxt_mp_t *mcp, nxt_lvlhsh_t *hash); +nxt_int_t njs_lexer_keywords_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash); njs_token_t njs_lexer_keyword(njs_lexer_t *lexer); nxt_int_t njs_parser(njs_vm_t *vm, njs_parser_t *parser, diff --git a/njs/njs_variable.c b/njs/njs_variable.c index f543552d..04dd5c8e 100644 --- a/njs/njs_variable.c +++ b/njs/njs_variable.c @@ -175,7 +175,7 @@ njs_reference_hash_test(nxt_lvlhsh_query_t *lhq, void *data) } -const nxt_lvlhsh_proto_t njs_reference_hash_proto +const nxt_lvlhsh_proto_t njs_references_hash_proto nxt_aligned(64) = { NXT_LVLHSH_DEFAULT, @@ -205,7 +205,7 @@ njs_variable_reference(njs_vm_t *vm, njs_parser_scope_t *scope, lhq.key_hash = hash; lhq.key = vr->name; - lhq.proto = &njs_reference_hash_proto; + lhq.proto = &njs_references_hash_proto; lhq.replace = 0; lhq.value = node; lhq.pool = vm->mem_pool;