You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/05/03 10:23:26 UTC

svn commit: r1333354 - in /subversion/trunk/subversion: include/private/svn_subr_private.h libsvn_subr/hash.c

Author: stefan2
Date: Thu May  3 08:23:25 2012
New Revision: 1333354

URL: http://svn.apache.org/viewvc?rev=1333354&view=rev
Log:
Make clear that svn_hash__make_fast returns a hash with platform-
dependent item order. Also, improve READ_CHUNK macro.

* subversion/include/private/svn_subr_private.h
  (svn_hash__make_fast): improve docstring
* subversion/libsvn_subr/hash.c
  (READ_CHUNK): reformat, remove trailing ';', improve docstring

Modified:
    subversion/trunk/subversion/include/private/svn_subr_private.h
    subversion/trunk/subversion/libsvn_subr/hash.c

Modified: subversion/trunk/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_subr_private.h?rev=1333354&r1=1333353&r2=1333354&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_subr_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_subr_private.h Thu May  3 08:23:25 2012
@@ -293,7 +293,7 @@ svn_hash__make(apr_pool_t *pool);
 
 /** Returns a hash table, allocated in @a pool, that is faster to modify
  * and access then the ones returned by @ref svn_hash__make. The element
- * order does not match any APR default.
+ * order does not match any APR default and is platform dependent.
  *
  * @since New in 1.8.
  */

Modified: subversion/trunk/subversion/libsvn_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/hash.c?rev=1333354&r1=1333353&r2=1333354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/hash.c (original)
+++ subversion/trunk/subversion/libsvn_subr/hash.c Thu May  3 08:23:25 2012
@@ -619,11 +619,10 @@ hashfunc_compatible(const char *char_key
 #define LOWER_7BITS_SET 0x7f7f7f7f
 #define BIT_7_SET       0x80808080
 
-/* Read 4 bytes as little endian at P 
+/* Read 4 bytes at P. LE / BE interpretation is platform-dependent
  */
 #if SVN_UNALIGNED_ACCESS_IS_OK
-#  define READ_CHUNK(p)\
-     *(const apr_uint32_t *)(p);
+#  define READ_CHUNK(p) *(const apr_uint32_t *)(p)
 #else
 #  define READ_CHUNK(p) \
      (   (apr_uint32_t)p[0]        \