diff options
Diffstat (limited to 'src/binaryen-c.cpp')
-rw-r--r-- | src/binaryen-c.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 36aebb523..c554b0a23 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -35,6 +35,10 @@ #include "ir/utils.h" #include "shell-interface.h" +#ifdef __EMSCRIPTEN__ +#include <emscripten.h> +#endif + using namespace wasm; // Literal utilities @@ -3054,6 +3058,15 @@ BinaryenFunctionTypeRef BinaryenGetFunctionTypeBySignature(BinaryenModuleRef mod int atexit(void (*function)(void)) { return 0; } + +// Internal binaryen.js APIs + +// Returns the size of a Literal object. +EMSCRIPTEN_KEEPALIVE +size_t BinaryenSizeofLiteral(void) { + return sizeof(Literal); +} + #endif } // extern "C" |