subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1130538 - in /subversion/trunk/subversion: include/private/svn_io_private.h include/svn_io.h libsvn_subr/stream.c libsvn_subr/subst.c
Date Thu, 02 Jun 2011 13:24:39 GMT
Author: julianfoad
Date: Thu Jun  2 13:24:38 2011
New Revision: 1130538

URL: http://svn.apache.org/viewvc?rev=1130538&view=rev
Log:
Make svn_stream_is_buffered() and related symbols private, renaming to
svn_stream__* and moving to svn_io_private.h.

* subversion/include/svn_io.h
  (svn_stream_is_buffered_fn_t, svn_stream_set_is_buffered,
   svn_stream_is_buffered): Move and rename from here ...

* subversion/include/private/svn_io_private.h
  (svn_stream__is_buffered_fn_t, svn_stream__set_is_buffered,
   svn_stream__is_buffered): ... to here.

* subversion/libsvn_subr/stream.c
  (svn_stream_set_is_buffered, svn_stream_is_buffered): Rename as above.
  (svn_stream_t, stream_readline, svn_stream_empty,
   is_buffered_handler_disown, svn_stream_disown, svn_stream_from_aprfile2,
   svn_stream_from_stringbuf, svn_stream_from_string): Adjust accordingly.

* subversion/libsvn_subr/subst.c
  (translated_stream_is_buffered, stream_translated): Adjust accordingly.

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

Modified: subversion/trunk/subversion/include/private/svn_io_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_io_private.h?rev=1130538&r1=1130537&r2=1130538&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_io_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_io_private.h Thu Jun  2 13:24:38 2011
@@ -64,6 +64,31 @@ svn_io__is_finfo_read_only(svn_boolean_t
                            apr_pool_t *pool);
 
 
+/** Buffer test handler function for a generic stream. @see svn_stream_t 
+ * and svn_stream__is_buffered().
+ *
+ * @since New in 1.7.
+ */
+typedef svn_boolean_t (*svn_stream__is_buffered_fn_t)(void *baton);
+
+/** Set @a stream's buffer test function to @a is_buffered_fn
+ *
+ * @since New in 1.7.
+ */
+void
+svn_stream__set_is_buffered(svn_stream_t *stream,
+                            svn_stream__is_buffered_fn_t is_buffered_fn);
+
+/** Return whether this generic @a stream uses internal buffering.
+ * This may be used to work around subtle differences between buffered
+ * an non-buffered APR files.
+ *
+ * @since New in 1.7.
+ */
+svn_boolean_t
+svn_stream__is_buffered(svn_stream_t *stream);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/trunk/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1130538&r1=1130537&r2=1130538&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Thu Jun  2 13:24:38 2011
@@ -804,13 +804,6 @@ typedef svn_error_t *(*svn_stream_mark_f
 typedef svn_error_t *(*svn_stream_seek_fn_t)(void *baton,
                                          const svn_stream_mark_t *mark);
 
-/** Buffer test handler function for a generic stream. @see svn_stream_t 
- * and svn_stream_is_buffered().
- *
- * @since New in 1.7.
- */
-typedef svn_boolean_t (*svn_stream_is_buffered_fn_t)(void *baton);
-
 /** Create a generic stream.  @see svn_stream_t. */
 svn_stream_t *
 svn_stream_create(void *baton,
@@ -860,14 +853,6 @@ void
 svn_stream_set_seek(svn_stream_t *stream,
                     svn_stream_seek_fn_t seek_fn);
 
-/** Set @a stream's buffer test function to @a is_buffered_fn
- *
- * @since New in 1.7.
- */
-void
-svn_stream_set_is_buffered(svn_stream_t *stream,
-                           svn_stream_is_buffered_fn_t is_buffered_fn);
-
 /** Create a stream that is empty for reading and infinite for writing. */
 svn_stream_t *
 svn_stream_empty(apr_pool_t *pool);
@@ -1152,15 +1137,6 @@ svn_stream_mark(svn_stream_t *stream,
 svn_error_t *
 svn_stream_seek(svn_stream_t *stream, const svn_stream_mark_t *mark);
 
-/** Return whether this generic @a stream uses internal buffering.
- * This may be used to work around subtle differences between buffered
- * an non-buffered APR files.
- *
- * @since New in 1.7.
- */
-svn_boolean_t
-svn_stream_is_buffered(svn_stream_t *stream);
-
 /** Return a writable stream which, when written to, writes to both of the
  * underlying streams.  Both of these streams will be closed upon closure of
  * the returned stream; use svn_stream_disown() if this is not the desired

Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1130538&r1=1130537&r2=1130538&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Thu Jun  2 13:24:38 2011
@@ -43,6 +43,7 @@
 #include "svn_checksum.h"
 #include "svn_path.h"
 #include "private/svn_eol_private.h"
+#include "private/svn_io_private.h"
 
 
 struct svn_stream_t {
@@ -53,7 +54,7 @@ struct svn_stream_t {
   svn_close_fn_t close_fn;
   svn_stream_mark_fn_t mark_fn;
   svn_stream_seek_fn_t seek_fn;
-  svn_stream_is_buffered_fn_t is_buffered_fn;
+  svn_stream__is_buffered_fn_t is_buffered_fn;
 };
 
 
@@ -127,8 +128,8 @@ svn_stream_set_seek(svn_stream_t *stream
 }
 
 void
-svn_stream_set_is_buffered(svn_stream_t *stream,
-                           svn_stream_is_buffered_fn_t is_buffered_fn)
+svn_stream__set_is_buffered(svn_stream_t *stream,
+                            svn_stream__is_buffered_fn_t is_buffered_fn)
 {
   stream->is_buffered_fn = is_buffered_fn;
 }
@@ -192,7 +193,7 @@ svn_stream_seek(svn_stream_t *stream, co
 }
 
 svn_boolean_t
-svn_stream_is_buffered(svn_stream_t *stream)
+svn_stream__is_buffered(svn_stream_t *stream)
 {
   if (stream->is_buffered_fn == NULL)
     return FALSE;
@@ -473,7 +474,7 @@ stream_readline(svn_stringbuf_t **string
    * EOL we are looking for. Optimize that common case.
    */
   if (svn_stream_supports_mark(stream) &&
-      svn_stream_is_buffered(stream))
+      svn_stream__is_buffered(stream))
     {
       /* We can efficiently read chunks speculatively and reposition the
        * stream pointer to the end of the line once we found that.
@@ -675,7 +676,7 @@ svn_stream_empty(apr_pool_t *pool)
   svn_stream_set_write(stream, write_handler_empty);
   svn_stream_set_mark(stream, mark_handler_empty);
   svn_stream_set_seek(stream, seek_handler_empty);
-  svn_stream_set_is_buffered(stream, is_buffered_handler_empty);
+  svn_stream__set_is_buffered(stream, is_buffered_handler_empty);
   return stream;
 }
 
@@ -773,7 +774,7 @@ seek_handler_disown(void *baton, const s
 static svn_boolean_t
 is_buffered_handler_disown(void *baton)
 {
-  return svn_stream_is_buffered(baton);
+  return svn_stream__is_buffered(baton);
 }
 
 svn_stream_t *
@@ -786,7 +787,7 @@ svn_stream_disown(svn_stream_t *stream, 
   svn_stream_set_write(s, write_handler_disown);
   svn_stream_set_mark(s, mark_handler_disown);
   svn_stream_set_seek(s, seek_handler_disown);
-  svn_stream_set_is_buffered(s, is_buffered_handler_disown);
+  svn_stream__set_is_buffered(s, is_buffered_handler_disown);
 
   return s;
 }
@@ -972,7 +973,7 @@ svn_stream_from_aprfile2(apr_file_t *fil
   svn_stream_set_skip(stream, skip_handler_apr);
   svn_stream_set_mark(stream, mark_handler_apr);
   svn_stream_set_seek(stream, seek_handler_apr);
-  svn_stream_set_is_buffered(stream, is_buffered_handler_apr);
+  svn_stream__set_is_buffered(stream, is_buffered_handler_apr);
 
   if (! disown)
     svn_stream_set_close(stream, close_handler_apr);
@@ -1581,7 +1582,7 @@ svn_stream_from_stringbuf(svn_stringbuf_
   svn_stream_set_write(stream, write_handler_stringbuf);
   svn_stream_set_mark(stream, mark_handler_stringbuf);
   svn_stream_set_seek(stream, seek_handler_stringbuf);
-  svn_stream_set_is_buffered(stream, is_buffered_handler_stringbuf);
+  svn_stream__set_is_buffered(stream, is_buffered_handler_stringbuf);
   return stream;
 }
 
@@ -1675,7 +1676,7 @@ svn_stream_from_string(const svn_string_
   svn_stream_set_mark(stream, mark_handler_string);
   svn_stream_set_seek(stream, seek_handler_string);
   svn_stream_set_skip(stream, skip_handler_string);
-  svn_stream_set_is_buffered(stream, is_buffered_handler_string);
+  svn_stream__set_is_buffered(stream, is_buffered_handler_string);
   return stream;
 }
 

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1130538&r1=1130537&r2=1130538&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Thu Jun  2 13:24:38 2011
@@ -44,6 +44,7 @@
 #include "svn_io.h"
 #include "svn_subst.h"
 #include "svn_pools.h"
+#include "private/svn_io_private.h"
 
 #include "svn_private_config.h"
 
@@ -1358,12 +1359,12 @@ translated_stream_seek(void *baton, cons
   return SVN_NO_ERROR;
 }
 
-/* Implements svn_stream_is_buffered_fn_t. */
+/* Implements svn_stream__is_buffered_fn_t. */
 static svn_boolean_t
 translated_stream_is_buffered(void *baton)
 {
   struct translated_stream_baton *b = baton;
-  return svn_stream_is_buffered(b->stream);
+  return svn_stream__is_buffered(b->stream);
 }
 
 svn_error_t *
@@ -1475,7 +1476,7 @@ stream_translated(svn_stream_t *stream,
   svn_stream_set_close(s, translated_stream_close);
   svn_stream_set_mark(s, translated_stream_mark);
   svn_stream_set_seek(s, translated_stream_seek);
-  svn_stream_set_is_buffered(s, translated_stream_is_buffered);
+  svn_stream__set_is_buffered(s, translated_stream_is_buffered);
 
   return s;
 }



Mime
View raw message