re-org platform APIs, simplify porting process (#201)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
This commit is contained in:
@ -48,7 +48,7 @@ app_instance_main(wasm_module_inst_t module_inst)
|
||||
|
||||
wasm_application_execute_main(module_inst, app_argc, app_argv);
|
||||
if ((exception = wasm_runtime_get_exception(module_inst)))
|
||||
bh_printf("%s\n", exception);
|
||||
printf("%s\n", exception);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ void iwasm_main(void *arg1, void *arg2, void *arg3)
|
||||
|
||||
/* initialize runtime environment */
|
||||
if (!wasm_runtime_full_init(&init_args)) {
|
||||
bh_printf("Init runtime environment failed.\n");
|
||||
printf("Init runtime environment failed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ void iwasm_main(void *arg1, void *arg2, void *arg3)
|
||||
/* load WASM module */
|
||||
if (!(wasm_module = wasm_runtime_load(wasm_file_buf, wasm_file_size,
|
||||
error_buf, sizeof(error_buf)))) {
|
||||
bh_printf("%s\n", error_buf);
|
||||
printf("%s\n", error_buf);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ void iwasm_main(void *arg1, void *arg2, void *arg3)
|
||||
CONFIG_APP_HEAP_SIZE,
|
||||
error_buf,
|
||||
sizeof(error_buf)))) {
|
||||
bh_printf("%s\n", error_buf);
|
||||
printf("%s\n", error_buf);
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user