diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WTF/wtf/PrintStream.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WTF/wtf/PrintStream.cpp')
-rw-r--r-- | Source/WTF/wtf/PrintStream.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/WTF/wtf/PrintStream.cpp b/Source/WTF/wtf/PrintStream.cpp index bb7d39db9..97faf3031 100644 --- a/Source/WTF/wtf/PrintStream.cpp +++ b/Source/WTF/wtf/PrintStream.cpp @@ -28,6 +28,7 @@ #include <stdio.h> #include <wtf/text/CString.h> +#include <wtf/text/UniquedStringImpl.h> #include <wtf/text/WTFString.h> namespace WTF { @@ -43,15 +44,49 @@ void PrintStream::printf(const char* format, ...) va_end(argList); } +void PrintStream::printfVariableFormat(const char* format, ...) +{ +#if COMPILER(CLANG) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" +#elif COMPILER(GCC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" +#endif + va_list argList; + va_start(argList, format); + vprintf(format, argList); + va_end(argList); +#if COMPILER(CLANG) +#pragma clang diagnostic pop +#elif COMPILER(GCC) +#pragma GCC diagnostic pop +#endif +} + void PrintStream::flush() { } +PrintStream& PrintStream::begin() +{ + return *this; +} + +void PrintStream::end() +{ +} + void printInternal(PrintStream& out, const char* string) { out.printf("%s", string); } +void printInternal(PrintStream& out, const StringView& string) +{ + out.print(string.utf8()); +} + void printInternal(PrintStream& out, const CString& string) { out.print(string.data()); |