diff options
author | Paulo Matos <pmatos@linki.tools> | 2021-05-17 18:54:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 09:54:36 -0700 |
commit | 9844548855f0ebe962d2167356b9a4b31c248a2b (patch) | |
tree | 3afd1dc5d39342721d200683d4fd0f6e7b9eb597 /src | |
parent | dc516f10b5fa8fa7bf270eda97950d6e714956d3 (diff) | |
download | binaryen-9844548855f0ebe962d2167356b9a4b31c248a2b.tar.gz binaryen-9844548855f0ebe962d2167356b9a4b31c248a2b.tar.bz2 binaryen-9844548855f0ebe962d2167356b9a4b31c248a2b.zip |
Disable colors when writing module as text (#3890)
Via the C API.
Diffstat (limited to 'src')
-rw-r--r-- | src/binaryen-c.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 4d0a04718..d308d88e4 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -3881,7 +3881,11 @@ BinaryenModuleAllocateAndWrite(BinaryenModuleRef module, char* BinaryenModuleAllocateAndWriteText(BinaryenModuleRef module) { std::stringstream ss; + bool colors = Colors::isEnabled(); + + Colors::setEnabled(false); // do not use colors for writing ss << *(Module*)module; + Colors::setEnabled(colors); // restore colors state const std::string out = ss.str(); const int len = out.length() + 1; |