Remove character pointer typedefs (#2492)

The `[jerry|ecma]_char_ptr_t` types are some old legacy that are
used quite inconsistently. Their `[jerry|ecma]_char_t *` variants
are used a lot more often, so it's better to stick to one form
throughout the code base.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2018-08-30 09:33:05 +02:00
committed by László Langó
parent df1893042d
commit a2645601ae
11 changed files with 30 additions and 52 deletions
+1 -1
View File
@@ -1705,7 +1705,7 @@ jerry_parse_and_save_literals (const jerry_char_t *source_p, /**< script source
/* Save the array of literals. */
destination_p = jerry_append_chars_to_buffer (destination_p,
buffer_end_p,
";\n\njerry_char_ptr_t literals[",
";\n\njerry_char_t *literals[",
0);
destination_p = jerry_append_number_to_buffer (destination_p, buffer_end_p, literal_count);
+2 -2
View File
@@ -257,8 +257,8 @@ jerry_get_context_data (const jerry_context_data_manager_t *manager_p)
* Register external magic string array
*/
void
jerry_register_magic_strings (const jerry_char_ptr_t *ex_str_items_p, /**< character arrays, representing
* external magic strings' contents */
jerry_register_magic_strings (const jerry_char_t **ex_str_items_p, /**< character arrays, representing
* external magic strings' contents */
uint32_t count, /**< number of the strings */
const jerry_length_t *str_lengths_p) /**< lengths of all strings */
{
+1 -6
View File
@@ -120,11 +120,6 @@ typedef enum
*/
typedef uint8_t jerry_char_t;
/**
* Pointer to an array of character values.
*/
typedef jerry_char_t *jerry_char_ptr_t;
/**
* Size type of JerryScript.
*/
@@ -308,7 +303,7 @@ typedef struct jerry_instance_t jerry_instance_t;
*/
void jerry_init (jerry_init_flag_t flags);
void jerry_cleanup (void);
void jerry_register_magic_strings (const jerry_char_ptr_t *ex_str_items_p, uint32_t count,
void jerry_register_magic_strings (const jerry_char_t **ex_str_items_p, uint32_t count,
const jerry_length_t *str_lengths_p);
void jerry_gc (jerry_gc_mode_t mode);
void *jerry_get_context_data (const jerry_context_data_manager_t *manager_p);
+1 -1
View File
@@ -414,7 +414,7 @@ lit_char_get_utf8_length (ecma_char_t chr) /**< EcmaScript character */
bool
lit_read_code_unit_from_hex (const lit_utf8_byte_t *buf_p, /**< buffer with characters */
lit_utf8_size_t number_of_characters, /**< number of characters to be read */
ecma_char_ptr_t out_code_unit_p) /**< [out] decoded result */
ecma_char_t *out_code_unit_p) /**< [out] decoded result */
{
ecma_char_t code_unit = LIT_CHAR_NULL;
+1 -1
View File
@@ -220,7 +220,7 @@ size_t lit_char_get_utf8_length (ecma_char_t chr);
/* read a hex encoded code point from a zero terminated buffer */
bool lit_read_code_unit_from_hex (const lit_utf8_byte_t *buf_p, lit_utf8_size_t number_of_characters,
ecma_char_ptr_t out_code_unit_p);
ecma_char_t *out_code_unit_p);
/**
* Null character
-5
View File
@@ -78,11 +78,6 @@ typedef uint16_t ecma_char_t;
*/
typedef uint32_t ecma_length_t;
/**
* Description of an ecma-character pointer
*/
typedef ecma_char_t *ecma_char_ptr_t;
/**
* Max bytes needed to represent a code unit (utf-16 char) via utf-8 encoding
*/