diff options
Diffstat (limited to 'Source/WebCore/platform/cf')
| -rw-r--r-- | Source/WebCore/platform/cf/BinaryPropertyList.cpp | 2 | ||||
| -rw-r--r-- | Source/WebCore/platform/cf/FileSystemCF.cpp | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/Source/WebCore/platform/cf/BinaryPropertyList.cpp b/Source/WebCore/platform/cf/BinaryPropertyList.cpp index 27b44d4..41769e8 100644 --- a/Source/WebCore/platform/cf/BinaryPropertyList.cpp +++ b/Source/WebCore/platform/cf/BinaryPropertyList.cpp @@ -92,7 +92,7 @@ struct IntegerArrayHash { unsigned IntegerArrayHash::hash(const IntegerArray& array) { - return StringImpl::computeHash(reinterpret_cast<const UChar*>(array.integers()), array.size() / (sizeof(int) / sizeof(UChar))); + return WTF::StringHasher::createBlobHash(array.integers(), array.size()); } bool IntegerArrayHash::equal(const IntegerArray& a, const IntegerArray& b) diff --git a/Source/WebCore/platform/cf/FileSystemCF.cpp b/Source/WebCore/platform/cf/FileSystemCF.cpp index e3a144c..a4b422b 100644 --- a/Source/WebCore/platform/cf/FileSystemCF.cpp +++ b/Source/WebCore/platform/cf/FileSystemCF.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,12 +25,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #import "config.h" #import "FileSystem.h" #import "PlatformString.h" -#import <wtf/text/CString.h> #import <wtf/RetainPtr.h> +#import <wtf/text/CString.h> namespace WebCore { @@ -54,4 +55,16 @@ CString fileSystemRepresentation(const String& path) return string; } +RetainPtr<CFURLRef> pathAsURL(const String& path) +{ + CFURLPathStyle pathStyle; +#if PLATFORM(WIN) + pathStyle = kCFURLWindowsPathStyle; +#else + pathStyle = kCFURLPOSIXPathStyle; +#endif + return RetainPtr<CFURLRef>(AdoptCF, CFURLCreateWithFileSystemPath(0, + RetainPtr<CFStringRef>(AdoptCF, path.createCFString()).get(), pathStyle, FALSE)); +} + } // namespace WebCore |
