You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/31 23:38:33 UTC

svn commit: r1509042 - in /subversion/branches/fsx/subversion: include/private/svn_packed_data.h libsvn_subr/packed_data.c

Author: stefan2
Date: Wed Jul 31 21:38:33 2013
New Revision: 1509042

URL: http://svn.apache.org/r1509042
Log:
On the fsx branch:  Remove sub-stream support for byte streams in the
svn_packed__* API.  Keep the serialized format as is for the moment.

* subversion/include/private/svn_packed_data.h
  (svn_packed__create_bytes_substream,
   svn_packed__first_byte_substream): drop

* subversion/libsvn_subr/packed_data.c
  (packed_data_create_bytes_substream_body,
   svn_packed__create_bytes_substream,
   svn_packed__first_byte_substream): drop
  (svn_packed__int_count): update caller

Modified:
    subversion/branches/fsx/subversion/include/private/svn_packed_data.h
    subversion/branches/fsx/subversion/libsvn_subr/packed_data.c

Modified: subversion/branches/fsx/subversion/include/private/svn_packed_data.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/private/svn_packed_data.h?rev=1509042&r1=1509041&r2=1509042&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/private/svn_packed_data.h (original)
+++ subversion/branches/fsx/subversion/include/private/svn_packed_data.h Wed Jul 31 21:38:33 2013
@@ -141,12 +141,6 @@ svn_packed__create_int_substream(svn_pac
 svn_packed__byte_stream_t *
 svn_packed__create_bytes_stream(svn_packed__data_root_t *root);
 
-/* Create and return a new sub-stream to the existing byte sequence stream
- * PARENT.
- */
-svn_packed__byte_stream_t *
-svn_packed__create_bytes_substream(svn_packed__byte_stream_t *parent);
-
 /* Write the unsigned integer VALUE to STEAM.
  */
 void
@@ -207,12 +201,6 @@ svn_packed__next_byte_stream(svn_packed_
 svn_packed__int_stream_t *
 svn_packed__first_int_substream(svn_packed__int_stream_t *stream);
 
-/* Return the first sub-stream of STREAM.  Returns NULL in case there
- * isn't any.
- */
-svn_packed__byte_stream_t *
-svn_packed__first_byte_substream(svn_packed__byte_stream_t *stream);
-
 /* Return the number of integers left to read from STREAM.
  */
 apr_size_t

Modified: subversion/branches/fsx/subversion/libsvn_subr/packed_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_subr/packed_data.c?rev=1509042&r1=1509041&r2=1509042&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_subr/packed_data.c (original)
+++ subversion/branches/fsx/subversion/libsvn_subr/packed_data.c Wed Jul 31 21:38:33 2013
@@ -262,44 +262,6 @@ svn_packed__create_bytes_stream(svn_pack
   return stream;
 }
 
-/* Returns a new sub-stream for PARENT but does not initialize the
- * LENGTH_STREAM member.
- */
-static svn_packed__byte_stream_t *
-packed_data_create_bytes_substream_body(svn_packed__byte_stream_t *parent)
-{
-  svn_packed__byte_stream_t *stream
-    = apr_pcalloc(parent->pool, sizeof(*stream));
-
-  stream->packed = svn_stringbuf_create_empty(parent->pool);
-
-  if (parent->last_substream)
-    parent->last_substream->next = stream;
-  else
-    parent->first_substream = stream;
-
-  parent->last_substream = stream;
-  parent->substream_count++;
-
-  return stream;
-}
-
-svn_packed__byte_stream_t *
-svn_packed__create_bytes_substream(svn_packed__byte_stream_t *parent)
-{
-  packed_int_private_t *parent_length_private
-    = parent->lengths_stream->private_data;
-  svn_packed__byte_stream_t *stream
-    = packed_data_create_bytes_substream_body(parent);
-
-  stream->lengths_stream_index = parent_length_private->substream_count;
-  stream->lengths_stream
-    = svn_packed__create_int_substream(parent->lengths_stream,
-                                            FALSE, FALSE);
-
-  return stream;
-}
-
 /* Write the 7b/8b representation of VALUE into BUFFER.  BUFFER must
  * provide at least 10 bytes space.
  * Returns the first position behind the written data.
@@ -680,12 +642,6 @@ svn_packed__first_int_substream(svn_pack
   return private_data->first_substream;
 }
 
-svn_packed__byte_stream_t *
-svn_packed__first_byte_substream(svn_packed__byte_stream_t *stream)
-{
-  return stream->first_substream;
-}
-
 apr_size_t
 svn_packed__int_count(svn_packed__int_stream_t *stream)
 {
@@ -973,18 +929,6 @@ read_byte_stream_structure(svn_stringbuf
         = stream->lengths_stream->private_data;
       stream->lengths_stream = length_private->next;
     }
-
-  /* reconstruct sub-streams */
-  for (i = 0; i < substream_count; ++i)
-    {
-      svn_packed__byte_stream_t *substream
-        = packed_data_create_bytes_substream_body(stream);
-      packed_int_private_t *length_private
-        = stream->lengths_stream->private_data;
-      read_byte_stream_structure(tree_struct,
-                                 substream,
-                                 length_private->first_substream);
-    }
 }
 
 /* Read a compressed block from STREAM and uncompress it into UNCOMPRESSED.