[njs] Style.

Dmitry Volyntsev xeioex at nginx.com
Mon May 20 16:37:30 UTC 2019


details:   https://hg.nginx.org/njs/rev/283813f5840f
branches:  
changeset: 972:283813f5840f
user:      hongzhidao <hongzhidao at gmail.com>
date:      Mon May 20 16:05:58 2019 +0800
description:
Style.

diffstat:

 njs/njs_builtin.c         |  17 +++++++++--------
 njs/njs_builtin.h         |   1 +
 njs/njs_parser_terminal.c |   2 +-
 njs/njs_vm.h              |   1 +
 4 files changed, 12 insertions(+), 9 deletions(-)

diffs (89 lines):

diff -r 14ec3b2096af -r 283813f5840f njs/njs_builtin.c
--- a/njs/njs_builtin.c	Mon May 20 23:14:29 2019 +0800
+++ b/njs/njs_builtin.c	Mon May 20 16:05:58 2019 +0800
@@ -30,11 +30,11 @@ static nxt_array_t *njs_vm_expression_co
 static nxt_array_t *njs_object_completions(njs_vm_t *vm, njs_object_t *object);
 
 
-const njs_object_init_t     njs_njs_object_init;
-const njs_object_init_t     njs_global_this_init;
+const njs_object_init_t  njs_njs_object_init;
+const njs_object_init_t  njs_global_this_init;
 
 
-const njs_object_init_t    *njs_object_init[] = {
+const njs_object_init_t  *njs_object_init[] = {
     &njs_global_this_init,        /* global this        */
     &njs_njs_object_init,         /* global njs object  */
     &njs_math_object_init,        /* Math               */
@@ -43,9 +43,9 @@ const njs_object_init_t    *njs_object_i
 };
 
 
-const njs_object_init_t    *njs_module_init[] = {
-    &njs_fs_object_init,         /* fs                 */
-    &njs_crypto_object_init,     /* crypto             */
+const njs_object_init_t  *njs_module_init[] = {
+    &njs_fs_object_init,          /* fs                 */
+    &njs_crypto_object_init,      /* crypto             */
     NULL
 };
 
@@ -73,7 +73,7 @@ const njs_object_init_t  *njs_prototype_
 };
 
 
-const njs_object_init_t    *njs_constructor_init[] = {
+const njs_object_init_t  *njs_constructor_init[] = {
     &njs_object_constructor_init,
     &njs_array_constructor_init,
     &njs_boolean_constructor_init,
@@ -97,7 +97,7 @@ const njs_object_init_t    *njs_construc
 };
 
 
-const njs_object_init_t    *njs_function_init[] = {
+const njs_object_init_t  *njs_function_init[] = {
     &njs_eval_function_init,
     &njs_to_string_function_init,
     &njs_is_nan_function_init,
@@ -165,6 +165,7 @@ const njs_function_init_t  njs_native_co
     { njs_memory_error_constructor,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
 };
 
+
 const njs_object_prototype_t  njs_prototype_values[] = {
     /*
      * GCC 4 complains about uninitialized .shared field,
diff -r 14ec3b2096af -r 283813f5840f njs/njs_builtin.h
--- a/njs/njs_builtin.h	Mon May 20 23:14:29 2019 +0800
+++ b/njs/njs_builtin.h	Mon May 20 16:05:58 2019 +0800
@@ -13,4 +13,5 @@ extern const njs_object_init_t  *njs_mod
 extern const njs_object_init_t  *njs_prototype_init[];
 extern const njs_object_init_t  *njs_constructor_init[];
 
+
 #endif /* _NJS_BUILTIN_H_INCLUDED_ */
diff -r 14ec3b2096af -r 283813f5840f njs/njs_parser_terminal.c
--- a/njs/njs_parser_terminal.c	Mon May 20 23:14:29 2019 +0800
+++ b/njs/njs_parser_terminal.c	Mon May 20 16:05:58 2019 +0800
@@ -805,7 +805,7 @@ njs_parser_template_expression(njs_vm_t 
 
     if (token != NJS_TOKEN_CLOSE_BRACE) {
         njs_parser_syntax_error(vm, parser,
-                            "Missing \"}\" in template expression");
+                                "Missing \"}\" in template expression");
         return NXT_ERROR;
     }
 
diff -r 14ec3b2096af -r 283813f5840f njs/njs_vm.h
--- a/njs/njs_vm.h	Mon May 20 23:14:29 2019 +0800
+++ b/njs/njs_vm.h	Mon May 20 16:05:58 2019 +0800
@@ -894,6 +894,7 @@ typedef enum {
 #define njs_is_callee_argument_index(index)                                   \
     (((index) & NJS_SCOPE_CALLEE_ARGUMENTS) == NJS_SCOPE_CALLEE_ARGUMENTS)
 
+
 enum njs_prototypes_e {
     NJS_PROTOTYPE_OBJECT = 0,
     NJS_PROTOTYPE_ARRAY,


More information about the nginx-devel mailing list