Introduce JERRY_ZSTR_ARG macro to avoid jerryx_print_string, jerryx_print_byte, jerry_port_print_byte, strlen (#4982)
Replace usage of jerryx_print_byte, jerryx_print_string with jerryx_print_buffer. As we now have JERRY_ZSTR_ARG, so we can take advantage of it With this, the jerry_port_print_byte port api won't need any more this reduced the port api surface JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
This commit is contained in:
1 parent
e4017f0b3a
commit
dfa9afbf6e
15 files changed
+64
-125
No files matched your search
@@ -222,8 +222,14 @@ restart:
|
||||
}
|
||||
else if (arguments.source_count == 0)
|
||||
{
|
||||
const char *prompt_p = (arguments.option_flags & OPT_FLAG_NO_PROMPT) ? "" : "jerry> ";
|
||||
jerryx_repl (prompt_p);
|
||||
if ((arguments.option_flags & OPT_FLAG_NO_PROMPT))
|
||||
{
|
||||
jerryx_repl (JERRY_ZSTR_ARG (""));
|
||||
}
|
||||
else
|
||||
{
|
||||
jerryx_repl (JERRY_ZSTR_ARG ("jerry> "));
|
||||
}
|
||||
}
|
||||
|
||||
result = jerry_run_jobs ();
|
||||
|
||||
Reference in new issue
Block a user