From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Tools/TestWebKitAPI/PlatformUtilities.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Tools/TestWebKitAPI/PlatformUtilities.cpp') diff --git a/Tools/TestWebKitAPI/PlatformUtilities.cpp b/Tools/TestWebKitAPI/PlatformUtilities.cpp index cebff7be9..c341d80be 100644 --- a/Tools/TestWebKitAPI/PlatformUtilities.cpp +++ b/Tools/TestWebKitAPI/PlatformUtilities.cpp @@ -31,6 +31,8 @@ namespace TestWebKitAPI { namespace Util { +#if WK_HAVE_C_SPI + WKContextRef createContextWithInjectedBundle() { WKRetainPtr injectedBundlePath(AdoptWK, createInjectedBundlePath()); @@ -76,14 +78,16 @@ std::string toSTD(WKRetainPtr string) return toSTD(string.get()); } -std::string toSTD(const char* string) +WKRetainPtr toWK(const char* utf8String) { - return std::string(string); + return WKRetainPtr(AdoptWK, WKStringCreateWithUTF8CString(utf8String)); } -WKRetainPtr toWK(const char* utf8String) +#endif // WK_HAVE_C_SPI + +std::string toSTD(const char* string) { - return WKRetainPtr(AdoptWK, WKStringCreateWithUTF8CString(utf8String)); + return std::string(string); } } // namespace Util -- cgit v1.2.1