Wasmtime: Problems with the C API header

Created on 1 Oct 2020  路  4Comments  路  Source: bytecodealliance/wasmtime

Using the latest macOS release (https://github.com/bytecodealliance/wasmtime/releases/download/v0.20.0/wasmtime-v0.20.0-x86_64-macos-c-api.tar.xz):

Some of the function defines, like WASM_API_EXTERN own wasm_config_t* wasm_config_new(); are not quite correct, and should use (void) for the arguments. () works, but defines a function with undeclared arguments, rather than with no arguments. Xcode, at least, will by default warn on this:

.../wasm.h:121:51: This function declaration is not a prototype
bug c-api

Most helpful comment

I've fixed it for you, https://github.com/WebAssembly/wasm-c-api/pull/160 :-).

All 4 comments

Subscribe to Label Action

cc @peterhuene


This issue or pull request has been labeled: "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Thanks for the report! This isn't actually a header which we define in this repository, it's located upstream at https://github.com/WebAssembly/wasm-c-api, so that's where the fix will need to land first for us to pull it in.

I've fixed it for you, https://github.com/WebAssembly/wasm-c-api/pull/160 :-).

Was this page helpful?
0 / 5 - 0 ratings