subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1130498 - /subversion/trunk/subversion/libsvn_subr/subst.c
Date Thu, 02 Jun 2011 11:15:53 GMT
Author: julianfoad
Date: Thu Jun  2 11:15:53 2011
New Revision: 1130498

URL: http://svn.apache.org/viewvc?rev=1130498&view=rev
Log:
Let the 'translated stream' implementation use the default skip handler instead
of providing its own copy of that handler.  A follow-up to r1130490.

* subversion/libsvn_subr/subst.c
  (translated_stream_skip): Remove.
  (stream_translated): Don't install a skip handler.

Modified:
    subversion/trunk/subversion/libsvn_subr/subst.c

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1130498&r1=1130497&r2=1130498&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Thu Jun  2 11:15:53 2011
@@ -1247,29 +1247,6 @@ translated_stream_read(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* Implements svn_skip_fn_t. */
-static svn_error_t *
-translated_stream_skip(void *baton,
-                       apr_size_t *count)
-{
-  apr_size_t total_bytes_read = 0;
-  apr_size_t bytes_read = 1;
-  char buffer[SVN__STREAM_CHUNK_SIZE];
-  svn_error_t *err = SVN_NO_ERROR;
-  apr_size_t to_read = *count;
-
-  while ((to_read > 0) && !err && (bytes_read > 0))
-    {
-      bytes_read = sizeof(buffer) < to_read ? sizeof(buffer) : to_read;
-      err = translated_stream_read(baton, buffer, &bytes_read);
-      total_bytes_read += bytes_read;
-      to_read -= bytes_read;
-    }
-
-  *count = total_bytes_read;
-  return err;
-}
-
 /* Implements svn_write_fn_t. */
 static svn_error_t *
 translated_stream_write(void *baton,
@@ -1494,7 +1471,6 @@ stream_translated(svn_stream_t *stream,
 
   /* Setup the stream methods */
   svn_stream_set_read(s, translated_stream_read);
-  svn_stream_set_skip(s, translated_stream_skip);
   svn_stream_set_write(s, translated_stream_write);
   svn_stream_set_close(s, translated_stream_close);
   svn_stream_set_mark(s, translated_stream_mark);



Mime
View raw message