summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-03-07 18:14:17 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2014-03-07 18:14:17 +0530
commit49b4c64a4bc47f6d1c6d2e121bc567da17b1cf8c (patch)
tree1f7b7c9c52dce02c316d1485d04314f1c7ece0b7
parent1d0d89457fdbd4491ff4227d926b76c574f78f1f (diff)
String cleanups.
Ported from 4cf0d8edaf1581c42949ad2cbb40183a2f657ddd Change-Id: I4aa32fdeafdd17135c56b9f113f1abd06df892cf
-rw-r--r--include/rtl/string.hxx2
-rw-r--r--include/rtl/ustring.hxx15
-rw-r--r--sal/util/sal.map7
3 files changed, 23 insertions, 1 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index f44ac54bad3d..7e0774838a7f 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -886,6 +886,8 @@ public:
@return a hash code value of the string data
@see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
*/
sal_uInt64 hashCode64() const SAL_THROW(())
{
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 06ba97b8800e..4a6309a3fd0c 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1187,6 +1187,21 @@ public:
}
/**
+ Returns a 64bit hash of the string data.
+ This hashes the entire data, while hashCode would do sampling for larger string sizes.
+
+ @return a hash code value of the string data
+
+ @see hashCode() for simple hashes
+
+ @since LibreOffice 4.3
+ */
+ sal_uInt64 hashCode64() const SAL_THROW(())
+ {
+ return rtl_ustr_hashCode64_WithLength( pData->buffer, pData->length );
+ }
+
+ /**
Returns a hashcode for this string.
@return a hash code value for this object.
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 73595f240d8c..c052a9335125 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -221,7 +221,6 @@ UDK_3_0_0 {
rtl_str_shortenedCompareIgnoreAsciiCase_WithLength;
rtl_str_hashCode;
rtl_str_hashCode_WithLength;
- rtl_str_hashCode64_WithLength;
rtl_str_indexOfChar;
rtl_str_indexOfChar_WithLength;
rtl_str_indexOfStr;
@@ -665,6 +664,12 @@ LIBO_UDK_4.1 { # symbols available in >= LibO 4.1
rtl_ustr_toUInt64;
} LIBO_UDK_4.0;
+LIBO_UDK_4.3 { #symbols available in >= LibO 4.3
+ global:
+ rtl_str_hashCode64_WithLength;
+ rtl_ustr_hashCode64_WithLength;
+} LIBO_UDK_4.2;
+
PRIVATE_1.0 {
global:
osl_detail_ObjectRegistry_storeAddresses;