diff options
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 9c468b0ea..daa1dc4fa 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -267,6 +267,13 @@ public: void writeTo(T& o) { for (auto c : *this) o << c; } + + std::vector<char> getAsChars() { + std::vector<char> ret; + ret.resize(size()); + std::copy(begin(), end(), ret.begin()); + return ret; + } }; namespace BinaryConsts { |