Revision: 5791
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5791&view=rev
Author:   hofman
Date:     2009-09-23 09:54:51 +0000 (Wed, 23 Sep 2009)

Log Message:
-----------
get cocoa hash, as that's a different size from CFHash for 64 bits

Modified Paths:
--------------
    trunk/NSPointerFunctions_SKExtensions.m

Modified: trunk/NSPointerFunctions_SKExtensions.m
===================================================================
--- trunk/NSPointerFunctions_SKExtensions.m     2009-09-23 09:29:32 UTC (rev 
5790)
+++ trunk/NSPointerFunctions_SKExtensions.m     2009-09-23 09:54:51 UTC (rev 
5791)
@@ -66,7 +66,7 @@
 static NSUInteger caseInsensitiveStringHash(const void *item, NSUInteger 
(*size)(const void *item)) {
     if(item == NULL) return 0;
     
-    uint32_t hash = 0;
+    NSUInteger hash = 0;
     CFAllocatorRef allocator = CFGetAllocator(item);
     CFIndex len = CFStringGetLength(item);
     
@@ -81,7 +81,7 @@
     // If we create the string with external characters, 
CFStringGetCharactersPtr is guaranteed to succeed; since we're going to call 
CFStringGetCharacters anyway in fastHash if CFStringGetCharactsPtr fails, let's 
do it now when we lowercase the string
     CFMutableStringRef mutableString = 
CFStringCreateMutableWithExternalCharactersNoCopy(allocator, buffer, len, len + 
10, (buffer != stackBuffer ? allocator : kCFAllocatorNull));
     CFStringLowercase(mutableString, NULL);
-    hash = CFHash(mutableString);
+    hash = [(id)mutableString hash];
     // if we used the allocator, this should free the buffer for us
     CFRelease(mutableString);
     return hash;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to