From cdcdda11bbdf2d39340ec9bdb51e6af8e2cb268c Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 14 Dec 2016 17:44:37 -0800 Subject: 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. --- src/binary-reader-ast.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/binary-reader-ast.c') 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); -- cgit v1.2.3