You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/11/16 18:50:02 UTC

svn commit: r1542542 - /subversion/trunk/subversion/libsvn_subr/iter.c

Author: rhuijben
Date: Sat Nov 16 17:50:02 2013
New Revision: 1542542

URL: http://svn.apache.org/r1542542
Log:
Use apr functions when available for functions that we expected to be
implemented by apr some day.

* subversion/libsvn_subr/iter.c
  (svn__apr_hash_index_key,
   svn__apr_hash_index_klen,
   svn__apr_hash_index_val): Use apr equivalent when available.

Modified:
    subversion/trunk/subversion/libsvn_subr/iter.c

Modified: subversion/trunk/subversion/libsvn_subr/iter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/iter.c?rev=1542542&r1=1542541&r2=1542542&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/iter.c (original)
+++ subversion/trunk/subversion/libsvn_subr/iter.c Sat Nov 16 17:50:02 2013
@@ -193,24 +193,37 @@ svn_iter__break(void)
 
 const void *svn__apr_hash_index_key(const apr_hash_index_t *hi)
 {
+#if APR_VERSION_AT_LEAST(1, 5, 0)
+  return apr_hash_this_key((apr_hash_index_t *)hi);
+#else
   const void *key;
 
+  apr_hash_this_key(
   apr_hash_this((apr_hash_index_t *)hi, &key, NULL, NULL);
   return key;
+#endif
 }
 
 apr_ssize_t svn__apr_hash_index_klen(const apr_hash_index_t *hi)
 {
+#if APR_VERSION_AT_LEAST(1, 5, 0)
+  return apr_hash_this_key_len((apr_hash_index_t *)hi);
+#else
   apr_ssize_t klen;
 
   apr_hash_this((apr_hash_index_t *)hi, NULL, &klen, NULL);
   return klen;
+#endif
 }
 
 void *svn__apr_hash_index_val(const apr_hash_index_t *hi)
 {
+#if APR_VERSION_AT_LEAST(1, 5, 0)
+  return apr_hash_this_val((apr_hash_index_t *)hi);
+#else
   void *val;
 
   apr_hash_this((apr_hash_index_t *)hi, NULL, NULL, &val);
   return val;
+#endif
 }