Refactor/fix/document the default port implementation (#2317)

- Various constructs could be expressed with simpler and/or more
  readable code.
- The jerry_port_log implementation for the debugger case was prone
  to buffer overflow error.
- Some documentation was still missing (even from
  jerryscript-port.h).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2018-05-09 11:15:45 +02:00
committed by GitHub
parent a1f71f8937
commit d6cf634239
6 changed files with 51 additions and 46 deletions
+3
View File
@@ -119,6 +119,7 @@ typedef struct
* CONFIG_DISABLE_DATE_BUILTIN is _not_ defined. Otherwise this function is
* not used.
*
* @param[out] tz_p time zone structure to fill.
* @return true - if success
* false - otherwise
*/
@@ -156,6 +157,8 @@ struct jerry_instance_t *jerry_port_get_current_instance (void);
* Note:
* This port function is called by jerry-core when JERRY_DEBUGGER is
* defined. Otherwise this function is not used.
*
* @param sleep_time milliseconds to sleep.
*/
void jerry_port_sleep (uint32_t sleep_time);