apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: [PATCH] Buckets: add copy function, ap_bucket_split_any(), etc
Date Sat, 09 Dec 2000 16:46:17 GMT
> > then split_any() could just tell it how much to read, and this wouldn't be as much
> > of an issue.  Alternately, split_any() could just keep track of how much was read
> > and loop through an arbitrary number of reads, incrementing until the totals
> > matched.  That's the least intrusive approach.  I'll implement it if people agree.

> > Thoughts?
> This is the approach that I had in mind. It is quite simple, actually: loop
> until the read() returns a length such that point <= length. If point >
> length, then subtract the length from point, and read the next bucket.
> Note that *no* split should occur when point == length.

This is different than all of the other split functions.  If point ==
length, then we get one bucket with length == point and one bucket with
length == 0.  This makes the code much easier to deal with, because it
removes special cases.


Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131

View raw message