re-org platform APIs, simplify porting process (#201)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
This commit is contained in:
@ -7,7 +7,6 @@
|
||||
#include <string.h>
|
||||
#include "bh_platform.h"
|
||||
#include "bh_log.h"
|
||||
#include "bh_platform_log.h"
|
||||
#include "wasm_export.h"
|
||||
#include "test_wasm.h"
|
||||
|
||||
@ -35,7 +34,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;
|
||||
}
|
||||
|
||||
@ -63,7 +62,7 @@ void iwasm_main(void *arg1)
|
||||
|
||||
/* initialize runtime environment */
|
||||
if (!wasm_runtime_full_init(&init_args)) {
|
||||
bh_printf("Init runtime environment failed.\n");
|
||||
printf("Init runtime environment failed.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -78,7 +77,7 @@ void iwasm_main(void *arg1)
|
||||
/* 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;
|
||||
}
|
||||
|
||||
@ -88,7 +87,7 @@ void iwasm_main(void *arg1)
|
||||
8 * 1024,
|
||||
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