diff options
author | Sam Clegg <sbc@chromium.org> | 2016-11-18 16:20:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 16:20:14 -0800 |
commit | 3382c7f9835fef7a3effa81d97d79bb48269ea0f (patch) | |
tree | 2a10396cc476904a8bb2d6c0d994ca46a96c911d /src/binary-reader.h | |
parent | efc81f5be6ce999c46681d46dd169a845ad670a7 (diff) | |
download | wabt-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.h | 6 |
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, |