test(runtime-c-api) Fix compilation errors in test-imports.c.

This commit is contained in:
Ivan Enderlin
2019-03-06 12:21:50 +01:00
parent c658224f0c
commit dcb4032e9d
4 changed files with 30 additions and 29 deletions

View File

@ -256,7 +256,7 @@ wasmer_import_descriptor_t *wasmer_import_descriptors_get(wasmer_import_descript
int wasmer_import_descriptors_len(wasmer_import_descriptors_t *exports);
/// Frees memory for the given Func
void wasmer_import_func_destroy(wasmer_import_func_t *func);
void wasmer_import_func_destroy(const wasmer_import_func_t *func);
/// Creates new func
/// The caller owns the object and should call `wasmer_import_func_destroy` to free it.
@ -309,7 +309,7 @@ wasmer_result_t wasmer_instance_call(wasmer_instance_t *instance,
/// Gets the memory within the context at the index `memory_idx`.
/// The index is always 0 until multiple memories are supported.
const wasmer_memory_t *wasmer_instance_context_memory(wasmer_instance_context_t *ctx,
const wasmer_memory_t *wasmer_instance_context_memory(const wasmer_instance_context_t *ctx,
uint32_t _memory_idx);
/// Frees memory for the given Instance
@ -353,7 +353,7 @@ int wasmer_last_error_length();
int wasmer_last_error_message(char *buffer, int length);
/// Gets the start pointer to the bytes within a Memory
uint8_t *wasmer_memory_data(wasmer_memory_t *mem);
uint8_t *wasmer_memory_data(const wasmer_memory_t *mem);
/// Gets the size in bytes of a Memory
uint32_t wasmer_memory_data_length(wasmer_memory_t *mem);
@ -368,7 +368,7 @@ void wasmer_memory_destroy(wasmer_memory_t *memory);
wasmer_result_t wasmer_memory_grow(wasmer_memory_t *memory, uint32_t delta);
/// Returns the current length in pages of the given memory
uint32_t wasmer_memory_length(wasmer_memory_t *memory);
uint32_t wasmer_memory_length(const wasmer_memory_t *memory);
/// Creates a new Memory for the given descriptor and initializes the given
/// pointer to pointer to a pointer to the new memory.