summaryrefslogtreecommitdiff
path: root/src/binary-reader-interpreter.h
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-04-24 15:18:57 -0700
committerGitHub <noreply@github.com>2017-04-24 15:18:57 -0700
commitf78f159d836ed6920f7a656a693220bbc9b5bbd6 (patch)
tree6b54d78ead821b7b524492bdde1ba8588d358bbb /src/binary-reader-interpreter.h
parentbcdb11f2ab3d778a83bf53ddfbd174b70ebaf02a (diff)
downloadwabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.tar.gz
wabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.tar.bz2
wabt-f78f159d836ed6920f7a656a693220bbc9b5bbd6.zip
Change {Source,Binary}ErrorHandler to C++ (#403)
Added some new classes: * BinaryErrorHandler: abstract base class * BinaryErrorHandlerFile: writes errors to a FILE* * SourceErrorHandler: abstract base class * SourceErrorHandlerNop: eats all errors * SourceErrorHandlerFile: writes errors to a FILE* There are some specific ones as well: * BinaryErrorHandlerAssert: used in wasm-interp to handle writing out a custom header with assertion "failures"; i.e. places where the error handler should fire. * BinaryErrorHandlerModule: used when parsing a .wast, but there's an embedded binary file.
Diffstat (limited to 'src/binary-reader-interpreter.h')
-rw-r--r--src/binary-reader-interpreter.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/binary-reader-interpreter.h b/src/binary-reader-interpreter.h
index 66fa5542..60f985ce 100644
--- a/src/binary-reader-interpreter.h
+++ b/src/binary-reader-interpreter.h
@@ -21,14 +21,15 @@
namespace wabt {
+class BinaryErrorHandler;
struct DefinedInterpreterModule;
struct InterpreterEnvironment;
struct ReadBinaryOptions;
-Result read_binary_interpreter(struct InterpreterEnvironment* env,
+Result read_binary_interpreter(InterpreterEnvironment* env,
const void* data,
size_t size,
- const struct ReadBinaryOptions* options,
+ const ReadBinaryOptions* options,
BinaryErrorHandler*,
DefinedInterpreterModule** out_module);