[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - sal/inc sal/util

Muthu Subramanian sumuthu at collabora.com
Tue Feb 18 08:10:17 CET 2014


 sal/inc/rtl/string.hxx  |    2 ++
 sal/inc/rtl/ustring.hxx |   15 +++++++++++++++
 sal/util/sal.map        |    7 ++++++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit fb2c25a7b82f38fb286c25cb33fcbc5247008d26
Author: Muthu Subramanian <sumuthu at collabora.com>
Date:   Tue Feb 18 12:49:05 2014 +0530

    String cleanups.
    
    Change-Id: Ia4a9630822678a7b9ea6e5af87e58cfd0ebacff3

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 4b7b072..e9a9342 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -872,6 +872,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/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index 36295116..1f75101 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1168,6 +1168,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 83d824c..7ab421f 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;
@@ -653,6 +652,12 @@ LIBO_UDK_4.0 { # symbols available in >= LibO 4.0
         rtl_uString_newReplaceAllFromIndex;
 } LIBO_UDK_3.6;
 
+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;


More information about the Libreoffice-commits mailing list