From e8659f373cd225fb5720bb7d9d39e35cc43aa523 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Thu, 2 Jul 2015 16:39:35 +0300 Subject: [PATCH] Rename ECMA_CHAR_NULL to LIT_CHAR_NULL, move it to jerry-core/lit/lit-char-helpers.h. JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com --- jerry-core/lit/lit-char-helpers.h | 5 +++++ jerry-core/lit/lit-globals.h | 5 ----- jerry-core/lit/lit-strings.cpp | 2 +- jerry-core/lit/lit-strings.h | 1 + jerry-core/parser/regexp/re-parser.cpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/jerry-core/lit/lit-char-helpers.h b/jerry-core/lit/lit-char-helpers.h index a88873b9e..794f74272 100644 --- a/jerry-core/lit/lit-char-helpers.h +++ b/jerry-core/lit/lit-char-helpers.h @@ -202,6 +202,11 @@ extern bool lit_char_is_unicode_connector_punctuation (ecma_char_t); #define LIT_CHAR_ASCII_DIGITS_BEGIN LIT_CHAR_0 /* decimal digits range */ #define LIT_CHAR_ASCII_DIGITS_END LIT_CHAR_9 +/** + * Null character + */ +#define LIT_CHAR_NULL ((ecma_char_t) '\0') + /* * Part of IsWordChar abstract operation (ECMA-262 v5, 15.10.2.6, step 3) */ diff --git a/jerry-core/lit/lit-globals.h b/jerry-core/lit/lit-globals.h index 7ba56c817..76bfeb8c6 100644 --- a/jerry-core/lit/lit-globals.h +++ b/jerry-core/lit/lit-globals.h @@ -73,11 +73,6 @@ */ typedef uint16_t ecma_char_t; -/** - * Null character - */ -#define ECMA_CHAR_NULL ((ecma_char_t) '\0') - /** * Description of a collection's/string's length */ diff --git a/jerry-core/lit/lit-strings.cpp b/jerry-core/lit/lit-strings.cpp index 268957947..b442f1c45 100644 --- a/jerry-core/lit/lit-strings.cpp +++ b/jerry-core/lit/lit-strings.cpp @@ -253,7 +253,7 @@ lit_utf8_iterator_read_code_unit_and_increment (lit_utf8_iterator_t *buf_iter_p) } JERRY_ASSERT (false); - return ECMA_CHAR_NULL; + return LIT_CHAR_NULL; } /* lit_utf8_iterator_read_code_unit_and_increment */ /** diff --git a/jerry-core/lit/lit-strings.h b/jerry-core/lit/lit-strings.h index 408090fcb..5e2b3e5db 100644 --- a/jerry-core/lit/lit-strings.h +++ b/jerry-core/lit/lit-strings.h @@ -17,6 +17,7 @@ #define LIT_UNICODE_HELPERS_H #include "jrt.h" +#include "lit-char-helpers.h" #include "lit-globals.h" /** diff --git a/jerry-core/parser/regexp/re-parser.cpp b/jerry-core/parser/regexp/re-parser.cpp index e960e5479..77a7820d7 100644 --- a/jerry-core/parser/regexp/re-parser.cpp +++ b/jerry-core/parser/regexp/re-parser.cpp @@ -226,7 +226,7 @@ re_count_num_of_groups (re_parser_ctx_t *parser_ctx_p) /**< RegExp parser contex parser_ctx_p->num_of_groups = 0; ch1 = get_ecma_char (&pattern_p); - while (ch1 != ECMA_CHAR_NULL) + while (ch1 != LIT_CHAR_NULL) { ecma_char_t ch0 = ch1; ch1 = get_ecma_char (&pattern_p);