subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1542542 - /subversion/trunk/subversion/libsvn_subr/iter.c
Date Sat, 16 Nov 2013 17:50:02 GMT
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
 }



Mime
View raw message