[njs] Style fixes.
Igor Sysoev
igor at sysoev.ru
Fri Mar 31 13:08:01 UTC 2017
details: http://hg.nginx.org/njs/rev/dc8af19bf47d
branches:
changeset: 326:dc8af19bf47d
user: Andrey Zelenkov <zelenkov at nginx.com>
date: Fri Mar 31 14:05:44 2017 +0300
description:
Style fixes.
diffstat:
njs/njs_regexp.c | 2 +-
njs/njs_string.c | 2 +-
njs/njs_vm.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r 8e20f235b71e -r dc8af19bf47d njs/njs_regexp.c
--- a/njs/njs_regexp.c Fri Mar 31 14:02:38 2017 +0300
+++ b/njs/njs_regexp.c Fri Mar 31 14:05:44 2017 +0300
@@ -565,7 +565,7 @@ njs_regexp_prototype_to_string(njs_vm_t
value = &args[0];
- if (value->type == NJS_REGEXP) {
+ if (njs_is_regexp(value)) {
pattern = value->data.u.regexp->pattern;
source = pattern->source;
diff -r 8e20f235b71e -r dc8af19bf47d njs/njs_string.c
--- a/njs/njs_string.c Fri Mar 31 14:02:38 2017 +0300
+++ b/njs/njs_string.c Fri Mar 31 14:05:44 2017 +0300
@@ -3573,7 +3573,7 @@ njs_values_hash_test(nxt_lvlhsh_query_t
return NXT_OK;
}
- if (value->type == NJS_STRING
+ if (njs_is_string(value)
&& value->data.string_size == lhq->key.length
&& memcmp(value->data.u.string->start, lhq->key.start, lhq->key.length)
== 0)
diff -r 8e20f235b71e -r dc8af19bf47d njs/njs_vm.c
--- a/njs/njs_vm.c Fri Mar 31 14:02:38 2017 +0300
+++ b/njs/njs_vm.c Fri Mar 31 14:05:44 2017 +0300
@@ -292,7 +292,7 @@ njs_value_retain(njs_value_t *value)
{
njs_string_t *string;
- if (value->type == NJS_STRING) {
+ if (njs_is_string(value)) {
if (value->data.external0 != 0xff) {
string = value->data.u.string;
@@ -313,7 +313,7 @@ njs_value_release(njs_vm_t *vm, njs_valu
{
njs_string_t *string;
- if (value->type == NJS_STRING) {
+ if (njs_is_string(value)) {
if (value->data.external0 != 0xff) {
string = value->data.u.string;
@@ -2071,7 +2071,7 @@ njs_values_strict_equal(const njs_value_
if (njs_is_numeric(val1)) {
- if (val1->type == NJS_VOID) {
+ if (njs_is_void(val1)) {
return 1;
}
More information about the nginx-devel
mailing list