subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1130184 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c
Date Wed, 01 Jun 2011 15:12:03 GMT
Author: julianfoad
Date: Wed Jun  1 15:12:03 2011
New Revision: 1130184

URL: http://svn.apache.org/viewvc?rev=1130184&view=rev
Log:
Rename the 'count' parameter of svn_stream_skip() to 'len' for consistency
with svn_stream_read(), since the semantics are very similar.  Also tweak
the order of members in the private stream object to match other places.

* subversion/include/svn_io.h
  (svn_skip_fn_t, svn_stream_skip): Rename 'count' to 'len'.

* subversion/libsvn_subr/stream.c
  (svn_stream_t): Move 'skip_fn' to be immediately after 'read_fn'.
  (svn_stream_skip): Rename 'count' to 'len'.

Modified:
    subversion/trunk/subversion/include/svn_io.h
    subversion/trunk/subversion/libsvn_subr/stream.c

Modified: subversion/trunk/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1130184&r1=1130183&r2=1130184&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Wed Jun  1 15:12:03 2011
@@ -768,7 +768,7 @@ typedef svn_error_t *(*svn_read_fn_t)(vo
  * @since New in 1.7.
  */
 typedef svn_error_t *(*svn_skip_fn_t)(void *baton,
-                                      apr_size_t *count);
+                                      apr_size_t *len);
 
 /** Write handler function for a generic stream.  @see svn_stream_t. */
 typedef svn_error_t *(*svn_write_fn_t)(void *baton,
@@ -1083,19 +1083,19 @@ svn_stream_read(svn_stream_t *stream,
                 apr_size_t *len);
 
 /**
- * Skip @a count bytes from a generic @a stream. If the stream is exhausted
- * before @a *count bytes have been read, return an error and set @a *count
+ * Skip @a len bytes from a generic @a stream. If the stream is exhausted
+ * before @a *len bytes have been read, return an error and set @a *len
  * to the actual number of bytes skipped.
  *
  * @note  No assumption can be made on the semantics of this function
- * other than that the stream read pointer will be advanced by *count
+ * other than that the stream read pointer will be advanced by *len
  * bytes. Depending on the capabilities of the underlying stream
  * implementation, this may for instance be translated into a sequence
  * of reads or a simple seek operation.
  */
 svn_error_t *
 svn_stream_skip(svn_stream_t *stream,
-                apr_size_t *count);
+                apr_size_t *len);
 
 /** Write to a generic stream. @see svn_stream_t. */
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1130184&r1=1130183&r2=1130184&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Wed Jun  1 15:12:03 2011
@@ -48,8 +48,8 @@
 struct svn_stream_t {
   void *baton;
   svn_read_fn_t read_fn;
-  svn_write_fn_t write_fn;
   svn_skip_fn_t skip_fn;
+  svn_write_fn_t write_fn;
   svn_close_fn_t close_fn;
   svn_io_mark_fn_t mark_fn;
   svn_io_seek_fn_t seek_fn;
@@ -136,10 +136,10 @@ svn_stream_read(svn_stream_t *stream, ch
 
 
 svn_error_t *
-svn_stream_skip(svn_stream_t *stream, apr_size_t *count)
+svn_stream_skip(svn_stream_t *stream, apr_size_t *len)
 {
   SVN_ERR_ASSERT(stream->skip_fn != NULL);
-  return stream->skip_fn(stream->baton, count);
+  return stream->skip_fn(stream->baton, len);
 }
 
 



Mime
View raw message