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:
@@ -191,10 +191,10 @@ const jerry_length_t magic_string_lengths[] =
|
||||
#undef JERRY_MAGIC_STRING_DEF
|
||||
};
|
||||
|
||||
const jerry_char_ptr_t magic_string_items[] =
|
||||
const jerry_char_t *magic_string_items[] =
|
||||
{
|
||||
#define JERRY_MAGIC_STRING_DEF(NAME, STRING) \
|
||||
(const jerry_char_ptr_t) jerry_magic_string_ex_ ## NAME,
|
||||
(const jerry_char_t *) jerry_magic_string_ex_ ## NAME,
|
||||
|
||||
JERRY_MAGIC_STRING_ITEMS
|
||||
|
||||
@@ -1126,7 +1126,7 @@ main (void)
|
||||
/* External Magic String */
|
||||
jerry_init (JERRY_INIT_SHOW_OPCODES);
|
||||
|
||||
uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_ptr_t));
|
||||
uint32_t num_magic_string_items = (uint32_t) (sizeof (magic_string_items) / sizeof (jerry_char_t *));
|
||||
jerry_register_magic_strings (magic_string_items,
|
||||
num_magic_string_items,
|
||||
magic_string_lengths);
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
/**
|
||||
* Magic strings
|
||||
*/
|
||||
static const jerry_char_ptr_t magic_strings[] =
|
||||
static const jerry_char_t *magic_strings[] =
|
||||
{
|
||||
(const jerry_char_ptr_t) " ",
|
||||
(const jerry_char_ptr_t) "a",
|
||||
(const jerry_char_ptr_t) "b",
|
||||
(const jerry_char_ptr_t) "c",
|
||||
(const jerry_char_ptr_t) "from",
|
||||
(const jerry_char_ptr_t) "func",
|
||||
(const jerry_char_ptr_t) "string",
|
||||
(const jerry_char_ptr_t) "snapshot"
|
||||
(const jerry_char_t *) " ",
|
||||
(const jerry_char_t *) "a",
|
||||
(const jerry_char_t *) "b",
|
||||
(const jerry_char_t *) "c",
|
||||
(const jerry_char_t *) "from",
|
||||
(const jerry_char_t *) "func",
|
||||
(const jerry_char_t *) "string",
|
||||
(const jerry_char_t *) "snapshot"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -371,11 +371,11 @@ main (void)
|
||||
literal_buffer_c,
|
||||
SNAPSHOT_BUFFER_SIZE,
|
||||
true);
|
||||
TEST_ASSERT (literal_sizes_c_format == 203);
|
||||
TEST_ASSERT (literal_sizes_c_format == 200);
|
||||
|
||||
static const char *expected_c_format = (
|
||||
"jerry_length_t literal_count = 4;\n\n"
|
||||
"jerry_char_ptr_t literals[4] =\n"
|
||||
"jerry_char_t *literals[4] =\n"
|
||||
"{\n"
|
||||
" \"Bb\",\n"
|
||||
" \"aa\",\n"
|
||||
|
||||
Reference in New Issue
Block a user