summaryrefslogtreecommitdiff
path: root/src/binary-reader-ast.c
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2016-12-14 17:44:37 -0800
committerGitHub <noreply@github.com>2016-12-14 17:44:37 -0800
commitcdcdda11bbdf2d39340ec9bdb51e6af8e2cb268c (patch)
treef0b5609e4404b0d4d44d3091809edbd749a0b27f /src/binary-reader-ast.c
parent55293660eb9f01d50256cb272478e2ad86713c6b (diff)
downloadwabt-cdcdda11bbdf2d39340ec9bdb51e6af8e2cb268c.tar.gz
wabt-cdcdda11bbdf2d39340ec9bdb51e6af8e2cb268c.tar.bz2
wabt-cdcdda11bbdf2d39340ec9bdb51e6af8e2cb268c.zip
Make some binary reading/writing utilities public (#245)
* Make some binary reading/writing utilities public This is mostly a refactor to make some of the internal binary reading/writing utilities public and available to the wasm linker prototype that I'm working on.
Diffstat (limited to 'src/binary-reader-ast.c')
-rw-r--r--src/binary-reader-ast.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/binary-reader-ast.c b/src/binary-reader-ast.c
index 01c092b1..e82b82c2 100644
--- a/src/binary-reader-ast.c
+++ b/src/binary-reader-ast.c
@@ -837,10 +837,11 @@ static WasmResult end_elem_segment_init_expr(uint32_t index, void* user_data) {
return WASM_OK;
}
-static WasmResult on_elem_segment_function_index_count(uint32_t index,
- uint32_t count,
- void* user_data) {
- Context* ctx = user_data;
+static WasmResult on_elem_segment_function_index_count(
+ WasmBinaryReaderContext* context,
+ uint32_t index,
+ uint32_t count) {
+ Context* ctx = context->user_data;
assert(index == ctx->module->elem_segments.size - 1);
WasmElemSegment* segment = ctx->module->elem_segments.data[index];
wasm_reserve_vars(ctx->allocator, &segment->vars, count);