[njs] Style.

Dmitry Volyntsev xeioex at nginx.com
Tue Jun 11 14:35:15 UTC 2019


details:   https://hg.nginx.org/njs/rev/c46dca06edb1
branches:  
changeset: 1003:c46dca06edb1
user:      hongzhidao <hongzhidao at gmail.com>
date:      Mon Jun 10 21:40:11 2019 -0400
description:
Style.

diffstat:

 njs/njs_object.c          |   8 ++++----
 njs/njs_object.h          |  10 +++++-----
 njs/njs_object_property.c |   8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)

diffs (108 lines):

diff -r 81ae2f4a1686 -r c46dca06edb1 njs/njs_object.c
--- a/njs/njs_object.c	Mon Jun 10 21:30:29 2019 -0400
+++ b/njs/njs_object.c	Mon Jun 10 21:40:11 2019 -0400
@@ -1142,7 +1142,7 @@ njs_object_define_property(njs_vm_t *vm,
 
     name = njs_arg(args, nargs, 2);
 
-    ret = njs_define_property(vm, value, name, descriptor->data.u.object);
+    ret = njs_object_prop_define(vm, value, name, descriptor->data.u.object);
     if (nxt_slow_path(ret != NXT_OK)) {
         return NXT_ERROR;
     }
@@ -1196,7 +1196,7 @@ njs_object_define_properties(njs_vm_t *v
         }
 
         if (prop->enumerable && njs_is_object(&prop->value)) {
-            ret = njs_define_property(vm, value, &prop->name,
+            ret = njs_object_prop_define(vm, value, &prop->name,
                                       prop->value.data.u.object);
 
             if (nxt_slow_path(ret != NXT_OK)) {
@@ -1227,7 +1227,7 @@ njs_object_get_own_property_descriptor(n
 
     property = njs_arg(args, nargs, 2);
 
-    return njs_object_property_descriptor(vm, &vm->retval, value, property);
+    return njs_object_prop_descriptor(vm, &vm->retval, value, property);
 }
 
 
@@ -1271,7 +1271,7 @@ njs_object_get_own_property_descriptors(
 
     for (i = 0; i < length; i++) {
         key = &names->start[i];
-        ret = njs_object_property_descriptor(vm, &descriptor, value, key);
+        ret = njs_object_prop_descriptor(vm, &descriptor, value, key);
         if (nxt_slow_path(ret != NXT_OK)) {
             return ret;
         }
diff -r 81ae2f4a1686 -r c46dca06edb1 njs/njs_object.h
--- a/njs/njs_object.h	Mon Jun 10 21:30:29 2019 -0400
+++ b/njs/njs_object.h	Mon Jun 10 21:40:11 2019 -0400
@@ -14,7 +14,7 @@ typedef enum {
     NJS_METHOD,
     NJS_PROPERTY_HANDLER,
     NJS_WHITEOUT,
-} njs_object_property_type_t;
+} njs_object_prop_type_t;
 
 
 /*
@@ -33,7 +33,7 @@ typedef struct {
     njs_value_t                 value;
     njs_value_t                 name;
 
-    njs_object_property_type_t  type:8;          /* 3 bits */
+    njs_object_prop_type_t      type:8;          /* 3 bits */
 
     njs_object_attribute_t      writable:8;      /* 2 bits */
     njs_object_attribute_t      enumerable:8;    /* 2 bits */
@@ -116,12 +116,12 @@ njs_object_prop_t *njs_object_prop_alloc
     const njs_value_t *value, uint8_t attributes);
 njs_object_prop_t *njs_object_property(njs_vm_t *vm, const njs_object_t *obj,
     nxt_lvlhsh_query_t *lhq);
-njs_ret_t njs_define_property(njs_vm_t *vm, njs_value_t *object,
+njs_ret_t njs_object_prop_define(njs_vm_t *vm, njs_value_t *object,
     const njs_value_t *name, const njs_object_t *descriptor);
-njs_ret_t njs_object_property_descriptor(njs_vm_t *vm, njs_value_t *dest,
+njs_ret_t njs_object_prop_descriptor(njs_vm_t *vm, njs_value_t *dest,
     const njs_value_t *value, const njs_value_t *property);
 njs_ret_t njs_prop_private_copy(njs_vm_t *vm, njs_property_query_t *pq);
-const char *njs_prop_type_string(njs_object_property_type_t type);
+const char *njs_prop_type_string(njs_object_prop_type_t type);
 
 extern const njs_object_init_t  njs_object_constructor_init;
 extern const njs_object_init_t  njs_object_prototype_init;
diff -r 81ae2f4a1686 -r c46dca06edb1 njs/njs_object_property.c
--- a/njs/njs_object_property.c	Mon Jun 10 21:30:29 2019 -0400
+++ b/njs/njs_object_property.c	Mon Jun 10 21:40:11 2019 -0400
@@ -748,8 +748,8 @@ njs_object_property(njs_vm_t *vm, const 
  *   (values can be set, but without property flags support).
  */
 njs_ret_t
-njs_define_property(njs_vm_t *vm, njs_value_t *object, const njs_value_t *name,
-    const njs_object_t *descriptor)
+njs_object_prop_define(njs_vm_t *vm, njs_value_t *object,
+    const njs_value_t *name, const njs_object_t *descriptor)
 {
     nxt_int_t             ret;
     njs_object_prop_t     *desc, *current;
@@ -970,7 +970,7 @@ static const njs_value_t  njs_object_con
 
 
 njs_ret_t
-njs_object_property_descriptor(njs_vm_t *vm, njs_value_t *dest,
+njs_object_prop_descriptor(njs_vm_t *vm, njs_value_t *dest,
     const njs_value_t *value, const njs_value_t *property)
 {
     nxt_int_t             ret;
@@ -1192,7 +1192,7 @@ njs_prop_private_copy(njs_vm_t *vm, njs_
 
 
 const char *
-njs_prop_type_string(njs_object_property_type_t type)
+njs_prop_type_string(njs_object_prop_type_t type)
 {
     switch (type) {
     case NJS_PROPERTY_REF:


More information about the nginx-devel mailing list