extensions
Volodymyr Shymanskyy 3 years ago
parent de822b7e0f
commit 158611f3e5

@ -540,8 +540,9 @@ jobs:
build-python: build-python:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false
matrix: 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

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

@ -326,7 +326,7 @@ namespace wasm3 {
* *
* This function provides a way to pass integer/float types, by first converting them to strings, * 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 * 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. * 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) { for (size_t i = 0; i < sizeof...(Args); ++i) {
argv[i] = argv_str[i].c_str(); 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); detail::check_error(res);
Ret ret; Ret ret;
/* FIXME: there should be a public API to get the return value */ /* 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 }; const char* i_argv[2] = { FIB_ARG_VALUE, NULL };
clock_t start = clock(); clock_t start = clock();
result = m3_CallArgV (f, 1, i_argv); result = m3_CallArgv (f, 1, i_argv);
clock_t end = clock(); clock_t end = clock();
if (result) FATAL("m3_Call: %s", result); if (result) FATAL("m3_Call: %s", result);

Loading…
Cancel
Save