You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/04/20 11:36:18 UTC
svn commit: r935845 - in /subversion/trunk/subversion: include/svn_iter.h
libsvn_subr/iter.c
Author: julianfoad
Date: Tue Apr 20 09:36:18 2010
New Revision: 935845
URL: http://svn.apache.org/viewvc?rev=935845&view=rev
Log:
Tweak the comments on iteration functions.
* subversion/include/svn_iter.h
(svn_iter_apr_hash, svn_iter_apr_array): Clarify how a "break" behaves on
the last iteration.
* subversion/libsvn_subr/iter.c
Rewrite a comment about the type casts, for clarity and to avoid saying
the casts avoid compiler warnings (because they don't necessarily).
Modified:
subversion/trunk/subversion/include/svn_iter.h
subversion/trunk/subversion/libsvn_subr/iter.c
Modified: subversion/trunk/subversion/include/svn_iter.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_iter.h?rev=935845&r1=935844&r2=935845&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_iter.h (original)
+++ subversion/trunk/subversion/include/svn_iter.h Tue Apr 20 09:36:18 2010
@@ -66,7 +66,7 @@ typedef svn_error_t *(*svn_iter_apr_hash
* If @a func returns an error other than @c SVN_ERR_ITER_BREAK, that
* error is returned. When @a func returns @c SVN_ERR_ITER_BREAK,
* iteration is interrupted, but no error is returned and @a *completed is
- * set to @c FALSE.
+ * set to @c FALSE (even if this iteration was the last one).
*
* @since New in 1.5.
*/
@@ -102,7 +102,7 @@ typedef svn_error_t *(*svn_iter_apr_arra
* If @a func returns an error other than @c SVN_ERR_ITER_BREAK, that
* error is returned. When @a func returns @c SVN_ERR_ITER_BREAK,
* iteration is interrupted, but no error is returned and @a *completed is
- * set to @c FALSE.
+ * set to @c FALSE (even if this iteration was the last one).
*
* @since New in 1.5.
*/
Modified: subversion/trunk/subversion/libsvn_subr/iter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/iter.c?rev=935845&r1=935844&r2=935845&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/iter.c (original)
+++ subversion/trunk/subversion/libsvn_subr/iter.c Tue Apr 20 09:36:18 2010
@@ -182,11 +182,12 @@ svn_iter__break(void)
return &internal_break_error;
}
-/* APR isn't fully constified, and apr_hash_this does not expect a const
- * hash index parameter. However, it does not modify the hash index,
- * and in Subversion we're trying to be const-correct.
- * So these functions all take const hash indices, and we cast the const
- * away when passing them down to APR to avoid compiler warnings. */
+/* Note about the type casts: apr_hash_this() does not expect a const hash
+ * index pointer even though it does not modify the hash index. In
+ * Subversion we're trying to be const-correct, so these functions all take
+ * a const hash index and we cast away the const when passing it down to
+ * APR. (A compiler may warn about casting away 'const', but at least this
+ * cast is explicit and gathered in one place.) */
const void *svn__apr_hash_index_key(const apr_hash_index_t *hi)
{