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 luoyonggang@gmail.com
This commit is contained in:
@@ -206,7 +206,7 @@ jerry_main (int argc, char *argv[])
|
||||
|
||||
if (files_counter == 0)
|
||||
{
|
||||
jerryx_repl ("jerry> ");
|
||||
jerryx_repl (JERRY_ZSTR_ARG ("jerry> "));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ main (void)
|
||||
jerry_init (JERRY_INIT_EMPTY);
|
||||
jerryx_register_global ("print", jerryx_handler_print);
|
||||
|
||||
jerryx_repl ("js> ");
|
||||
jerryx_repl (JERRY_ZSTR_ARG ("js> "));
|
||||
|
||||
jerry_cleanup ();
|
||||
} /* main */
|
||||
|
||||
Reference in New Issue
Block a user