Author: hwright
Date: Sun May 22 02:09:51 2011
New Revision: 1125860

URL: http://svn.apache.org/viewvc?rev=1125860&view=rev
Log:
Don't make the receiver func optional when retreiving properties.  (That's
kinda the whole point of the function.)

* subversion/include/private/svn_wc_private.h
  (svn_wc__prop_list_recursive): Update docstring.

* subversion/libsvn_wc/props.c
  (svn_wc__prp_list_recursive): Assert we have a receiver function, and
    don't bother checking it later.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_wc/props.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1125860&r1=1125859&r2=1125860&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sun May 22 
02:09:51 2011
@@ -672,7 +672,8 @@ typedef svn_error_t *(*svn_wc__proplist_
  * a hash table mapping <tt>const char *</tt> names onto <tt>const
  * svn_string_t *</tt> values for all the regular properties of the node
  * at @a local_abspath and any node beneath @a local_abspath within the
- * specified @a depth.
+ * specified @a depth. @a receiver_fun must not be NULL.
+ *
  * If @a propname is not NULL, the passed hash table will only contain
  * the property @a propname.
  *

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1125860&r1=1125859&r2=1125860&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Sun May 22 02:09:51 2011
@@ -1706,6 +1706,8 @@ svn_wc__prop_list_recursive(svn_wc_conte
                             void *cancel_baton,
                             apr_pool_t *scratch_pool)
 {
+  SVN_ERR_ASSERT(receiver_func);
+
   switch (depth)
     {
     case svn_depth_empty:
@@ -1720,7 +1722,7 @@ svn_wc__prop_list_recursive(svn_wc_conte
           SVN_ERR(svn_wc__db_read_props(&props, wc_ctx->db, local_abspath,
                                         scratch_pool, scratch_pool));
 
-        if (receiver_func && props && apr_hash_count(props) > 0)
+        if (props && apr_hash_count(props) > 0)
           SVN_ERR((*receiver_func)(receiver_baton, local_abspath, props,
                                    scratch_pool));
       }


Reply via email to