diff options
author | Ben Smith <binji@chromium.org> | 2016-04-11 11:32:52 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-04-15 00:17:16 -0700 |
commit | dbfd60b099753b34139bd99af0201cbc0da96be7 (patch) | |
tree | 77f96eb69fa5850273e2686fe5636190fc85abcf /src/wasm-vector.h | |
parent | 2a18cfc94c7a1db62466554d2b1190e28fd768d3 (diff) | |
download | wabt-dbfd60b099753b34139bd99af0201cbc0da96be7.tar.gz wabt-dbfd60b099753b34139bd99af0201cbc0da96be7.tar.bz2 wabt-dbfd60b099753b34139bd99af0201cbc0da96be7.zip |
generate names for unnamed AST nodes
Also add flag to run-roundtrip, writing wast output to stdout (useful
for testing)
Diffstat (limited to 'src/wasm-vector.h')
-rw-r--r-- | src/wasm-vector.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-vector.h b/src/wasm-vector.h index d67175cd..7a508138 100644 --- a/src/wasm-vector.h +++ b/src/wasm-vector.h @@ -74,6 +74,9 @@ void wasm_destroy_##name##_vector(struct WasmAllocator* allocator, \ type##Vector* vec) { \ wasm_free(allocator, vec->data); \ + vec->data = NULL; \ + vec->size = 0; \ + vec->capacity = 0; \ } \ WasmResult wasm_resize_##name##_vector(struct WasmAllocator* allocator, \ type##Vector* vec, size_t size) { \ |