[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1130118 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/stream.c libsvn_subr/subst.c

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 02 Jun 2011 14:30:10 +0100

On Wed, 2011-06-01 at 17:29 +0200, Stefan Sperling wrote:
> On Wed, Jun 01, 2011 at 11:15:16AM -0400, Greg Stein wrote:
> > The "few" that I was talking about were the "skip" and "mark"
> > concepts, too. Those seem to be very specialized, and maybe only used
> > by the "patch" code?

Oh, right.

> They are only used by the patch code. They are used while reading content
> from the patch target which can either be in a file or in memory (in
> case we're patching a property). So the stream abstraction is useful
> there but the patch code also requires seeking capabilities.
>
> We can make these APIs private if you like. Though I guess other clients
> might find them useful, too. We'll have to support this code anyway
> as part of the patch implementation.

I've made the is_buffered() API symbols private in r1130538.

Not sure yet about the others. "skip" is a pretty simple concept,
functionally equivalent to "read" but discarding the result, or
alternatively equivalent to "seek(..., SEEK_CUR, offset >= 0)". So
we're introducing limited forms of seek: seek to beginning, seek to
previously marked point, and now seek forward by N bytes. I don't know
whether that's too much clutter for a stream implementation or not.

Note: I simplified the _skip() API semantics a bit in r1130500, FWIW.

- Julian
Received on 2011-06-02 15:30:50 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.