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/02/07 11:21:40 UTC

svn commit: r1443387 - /subversion/trunk/subversion/include/svn_hash.h

Author: rhuijben
Date: Thu Feb  7 10:21:40 2013
New Revision: 1443387

URL: http://svn.apache.org/viewvc?rev=1443387&view=rev
Log:
Define two macros that should make using our most common type of apr_hash_t *
instances much easier.

* subversion/include/svn_hash.h
  (svn_hash_gets,
   svn_hash_sets): New macros.

Modified:
    subversion/trunk/subversion/include/svn_hash.h

Modified: subversion/trunk/subversion/include/svn_hash.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_hash.h?rev=1443387&r1=1443386&r2=1443387&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_hash.h (original)
+++ subversion/trunk/subversion/include/svn_hash.h Thu Feb  7 10:21:40 2013
@@ -240,6 +240,20 @@ svn_hash_from_cstring_keys(apr_hash_t **
                            const apr_array_header_t *keys,
                            apr_pool_t *pool);
 
+/* Shortcut for apr_hash_get() with a const char * key.
+ *
+ * @since New in 1.8.
+ */
+#define svn_hash_gets(ht, key) \
+            apr_hash_get(ht, key, APR_HASH_KEY_STRING)
+
+/* Shortcut for apr_hash_set() with a const char * key.
+ *
+ * @since New in 1.8.
+ */
+#define svn_hash_sets(ht, key, val) \
+            apr_hash_set(ht, key, APR_HASH_KEY_STRING, val)
+
 /** @} */
 
 /** @} */