Allow specifying optional max value in limits

This commit is contained in:
Brandon Fish
2019-02-19 00:05:08 -06:00
parent 380d766943
commit d2f3023191
5 changed files with 45 additions and 12 deletions

View File

@ -8,7 +8,10 @@ int main()
wasmer_memory_t *memory = NULL;
wasmer_limits_t descriptor;
descriptor.min = 10;
descriptor.max = 15;
wasmer_limit_option_t max;
max.has_some = true;
max.some = 15;
descriptor.max = max;
wasmer_result_t memory_result = wasmer_memory_new(&memory, descriptor);
printf("Memory result: %d\n", memory_result);
assert(memory_result == WASMER_OK);