extensions
Volodymyr Shymanskyy 3 years ago
parent de822b7e0f
commit 158611f3e5

@ -540,8 +540,9 @@ jobs:
build-python:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 ]
python-version: [ "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ]
steps:
- uses: actions/checkout@v2

@ -45,11 +45,13 @@ void run_wasm()
printf("Running...\n");
result = m3_CallV (f, 40);
if (result) FATAL("m3_Call: %s", result);
long value = *(uint64_t*)(runtime->stack);
printf("Result: %ld\n", value);
uint64_t value = 0;
result = m3_GetResultsV (f, &result);
if (result) FATAL("m3_GetResults: %s", result);
printf("Result: %lld\n", value);
}
int main()

@ -326,7 +326,7 @@ namespace wasm3 {
*
* This function provides a way to pass integer/float types, by first converting them to strings,
* and then letting WASM3 do the reverse conversion. This is to be fixed once WASM3 gains an equivalent
* of m3_CallWithArgs which can accept arbitrary types, not just strings.
* of m3_CallArgv which can accept arbitrary types, not just strings.
*
* Note that the type of the return value must be explicitly specified as a template argument.
*
@ -339,7 +339,7 @@ namespace wasm3 {
for (size_t i = 0; i < sizeof...(Args); ++i) {
argv[i] = argv_str[i].c_str();
}
M3Result res = m3_CallWithArgs(m_func, sizeof...(args), argv);
M3Result res = m3_CallArgv(m_func, sizeof...(args), argv);
detail::check_error(res);
Ret ret;
/* FIXME: there should be a public API to get the return value */

@ -80,7 +80,7 @@ void run_wasm()
const char* i_argv[2] = { FIB_ARG_VALUE, NULL };
clock_t start = clock();
result = m3_CallArgV (f, 1, i_argv);
result = m3_CallArgv (f, 1, i_argv);
clock_t end = clock();
if (result) FATAL("m3_Call: %s", result);

Loading…
Cancel
Save