diff options
author | Sam Clegg <sbc@chromium.org> | 2021-12-13 11:07:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-13 11:07:44 -0800 |
commit | 8538a888d4298f98b4a4f17d0e3a9496863cee2b (patch) | |
tree | 3a7ea607aca45c4f1a01266827c656c2989aa195 /src/binary-writer-spec.cc | |
parent | 134bafd382348c5bb2e6e5494b84300d0160c2f1 (diff) | |
download | wabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.tar.gz wabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.tar.bz2 wabt-8538a888d4298f98b4a4f17d0e3a9496863cee2b.zip |
Fix type names for function references (#1787)
This requires `Type::GetName` to return to be dynamicllay created and
return `std::string` rather then a `const char*`
As this diff shows this type name is only used in textual output and
error messages so should this change should not have a effect of binary
parse time or the interpreter.
Diffstat (limited to 'src/binary-writer-spec.cc')
-rw-r--r-- | src/binary-writer-spec.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binary-writer-spec.cc b/src/binary-writer-spec.cc index be09863d..96a2773b 100644 --- a/src/binary-writer-spec.cc +++ b/src/binary-writer-spec.cc @@ -160,7 +160,7 @@ void BinaryWriterSpec::WriteVar(const Var& var) { void BinaryWriterSpec::WriteTypeObject(Type type) { json_stream_->Writef("{"); WriteKey("type"); - WriteString(type.GetName()); + WriteString(type.GetName().c_str()); json_stream_->Writef("}"); } @@ -259,7 +259,7 @@ void BinaryWriterSpec::WriteConst(const Const& const_) { WriteString("v128"); WriteSeparator(); WriteKey("lane_type"); - WriteString(const_.lane_type().GetName()); + WriteString(const_.lane_type().GetName().c_str()); WriteSeparator(); WriteKey("value"); json_stream_->Writef("["); |