]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/sortkey.cpp
ICU-400.39.tar.gz
[apple/icu.git] / icuSources / i18n / sortkey.cpp
index a07ae9da962b41283738491d60a67cb823d73172..ceca9d165063631c74f4731acb61ea12213a7d18 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1996-2003, International Business Machines Corporation and    *
+* Copyright (C) 1996-2006, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */
@@ -43,7 +43,7 @@ U_NAMESPACE_BEGIN
 #define kInvalidHashCode ((int32_t)0)
 #define kEmptyHashCode ((int32_t)1)
 
-const char CollationKey::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CollationKey)
 
 CollationKey::CollationKey()
     : UObject(), fBogus(FALSE), fCount(0), fCapacity(0),
@@ -392,4 +392,12 @@ CollationKey::hashCode() const
 
 U_NAMESPACE_END
 
+U_CAPI int32_t U_EXPORT2
+ucol_keyHashCode(const uint8_t *key, 
+                       int32_t  length)
+{
+    U_NAMESPACE_QUALIFIER CollationKey newKey(key, length);
+    return newKey.hashCode();
+}
+
 #endif /* #if !UCONFIG_NO_COLLATION */