You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2001/02/28 23:22:51 UTC
Re: CVS update: subversion/subversion/include svn_delta.h
On Wed, Feb 28, 2001 at 11:06:19PM -0000, sussman@tigris.org wrote:
>...
> /* Set *STREAM to a pointer to a delta stream that will turn an empty
> - bytestream into STRING. */
> + bytestream into STRING. Do necessary allocation in POOL.
> +
> + When we call `svn_txdelta_next_window' on *STREAM, the window
> + returned will contain pointers directly into STRING (rather than
> + duplicating STRING's data.) So callers beware: make sure STRING
> + is not freed before STREAM and its windows! */
> void svn_txdelta_from_string (svn_txdelta_stream_t **stream,
> svn_string_t *string,
> apr_pool_t *pool);
That first sentence doesn't make sense. What does "empty bytestream" have to
do with anything? And we aren't putting anything "into" STRING, are we?
It seems more like this is a way to *read* a txdelta stream *from* a string,
right?
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: CVS update: subversion/subversion/include svn_delta.h
Posted by Jim Blandy <ji...@zwingli.cygnus.com>.
Ben Collins-Sussman <su...@newton.ch.collab.net> writes:
> The stream produces a series of windows which converts some "source"
> bytestring into a "target" bytestring, right? The "target" we want
> the consumer to construct is STRING. So what's the "source" in this
> case? If the windows are full of nothing but `new' ops, then the
> source is nothing. We're telling the consumer how to construct STRING
> from nothingness.
>
> Isn't this a consistent analogy?
It makes sense to me, with one correction: the text delta you're
constructing will turn *any* source string into the given target
string. The source string needn't be empty.
Re: CVS update: subversion/subversion/include svn_delta.h
Posted by Ben Collins-Sussman <su...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> On Wed, Feb 28, 2001 at 11:06:19PM -0000, sussman@tigris.org wrote:
> >...
> > /* Set *STREAM to a pointer to a delta stream that will turn an empty
> > - bytestream into STRING. */
> > + bytestream into STRING. Do necessary allocation in POOL.
> > +
> > + When we call `svn_txdelta_next_window' on *STREAM, the window
> > + returned will contain pointers directly into STRING (rather than
> > + duplicating STRING's data.) So callers beware: make sure STRING
> > + is not freed before STREAM and its windows! */
> > void svn_txdelta_from_string (svn_txdelta_stream_t **stream,
> > svn_string_t *string,
> > apr_pool_t *pool);
>
> That first sentence doesn't make sense. What does "empty bytestream" have to
> do with anything? And we aren't putting anything "into" STRING, are we?
>
> It seems more like this is a way to *read* a txdelta stream *from* a string,
> right?
Right.
I'm just trying to stick to the definition of a "txdelta_stream",
copying from the declaration above it.
The stream produces a series of windows which converts some "source"
bytestring into a "target" bytestring, right? The "target" we want
the consumer to construct is STRING. So what's the "source" in this
case? If the windows are full of nothing but `new' ops, then the
source is nothing. We're telling the consumer how to construct STRING
from nothingness.
Isn't this a consistent analogy?