diff options
author | Ben Smith <binjimin@gmail.com> | 2017-03-15 16:29:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 16:29:37 -0700 |
commit | 81a64d68c7ce50617bac025061d8f6db91b00ee9 (patch) | |
tree | 32583291abac0a319db96faf5fb6e82fef9852fe /src/binary-reader-ast.cc | |
parent | 8cc8ef1db69ba79b6f35d466bd376223d640b09a (diff) | |
download | wabt-81a64d68c7ce50617bac025061d8f6db91b00ee9.tar.gz wabt-81a64d68c7ce50617bac025061d8f6db91b00ee9.tar.bz2 wabt-81a64d68c7ce50617bac025061d8f6db91b00ee9.zip |
Fix potential one-definition-rule breaking structs (#356)
Context is the most common potential problem here, but I noticed that
wasm-link.h had some others too (DataSegment and Export).
These probably aren't an issue yet, since they all have trivial
constructors. As soon as we add non-trivial types to these they break
though.
Diffstat (limited to 'src/binary-reader-ast.cc')
-rw-r--r-- | src/binary-reader-ast.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/binary-reader-ast.cc b/src/binary-reader-ast.cc index 2ab46655..8cd4fb4e 100644 --- a/src/binary-reader-ast.cc +++ b/src/binary-reader-ast.cc @@ -34,6 +34,8 @@ namespace wabt { +namespace { + struct LabelNode { LabelType label_type; Expr** first; @@ -51,6 +53,8 @@ struct Context { Expr** current_init_expr; }; +} // namespace + static bool handle_error(Context* ctx, uint32_t offset, const char* message); static void WABT_PRINTF_FORMAT(2, 3) |