old-docs.wasmer.io
old-docs.wasmer.io copied to clipboard
Small issues in passing-data example
I found some issues in the passing data example: https://docs.wasmer.io/integrations/c/examples/passing-data
First, the path to the wasm module (example-wasienv-wasm/strings-wasm-is-cool/strings-wasm-is-cool.wasm
) seems to a different one than the one pointed to use.
On the premise that the correct one is this: https://github.com/wasmerio/docs.wasmer.io/blob/master/integrations/shared/c/passing-data.c, there are some fixes to be made.
First, when calling the add_wasm_is_cool
function, the length of the original string should be passed as an argument. The second one is that the function that returns the pointer to the byte_buffer
is called get_wasm_memory_buffer_pointer
instead of get_buffer_pointer