summaryrefslogtreecommitdiff
path: root/Source/WTF/wtf/PrintStream.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WTF/wtf/PrintStream.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WTF/wtf/PrintStream.cpp')
-rw-r--r--Source/WTF/wtf/PrintStream.cpp35
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());