summaryrefslogtreecommitdiff
path: root/src/binary-reader.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2016-11-18 16:20:14 -0800
committerGitHub <noreply@github.com>2016-11-18 16:20:14 -0800
commit3382c7f9835fef7a3effa81d97d79bb48269ea0f (patch)
tree2a10396cc476904a8bb2d6c0d994ca46a96c911d /src/binary-reader.h
parentefc81f5be6ce999c46681d46dd169a845ad670a7 (diff)
downloadwabt-3382c7f9835fef7a3effa81d97d79bb48269ea0f.tar.gz
wabt-3382c7f9835fef7a3effa81d97d79bb48269ea0f.tar.bz2
wabt-3382c7f9835fef7a3effa81d97d79bb48269ea0f.zip
Parse arbitrary user sections (#220)
Handle user sections interspersed with other section types and add tests for these. Switch from calling these sections "Unknown" to "User".
Diffstat (limited to 'src/binary-reader.h')
-rw-r--r--src/binary-reader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/binary-reader.h b/src/binary-reader.h
index feef44f5..617dec4c 100644
--- a/src/binary-reader.h
+++ b/src/binary-reader.h
@@ -49,6 +49,12 @@ typedef struct WasmBinaryReader {
WasmResult (*begin_module)(uint32_t version, void* user_data);
WasmResult (*end_module)(void* user_data);
+ /* user section */
+ WasmResult (*begin_user_section)(WasmBinaryReaderContext* ctx,
+ uint32_t size,
+ WasmStringSlice section_name);
+ WasmResult (*end_user_section)(WasmBinaryReaderContext* ctx);
+
/* signatures section */
/* TODO(binji): rename to "type" section */
WasmResult (*begin_signature_section)(WasmBinaryReaderContext* ctx,