apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: Clarification: apr_brigade_split()
Date Wed, 25 Oct 2006 00:53:25 GMT
Graham Leggett wrote:
> Hi all,
> Can anyone explain the contract for apr_brigade split? I have read and 
> reread the doxygen description, and it makes no sense to me.
> apr_bucket_brigade* a = apr_brigade_split(apr_bucket_brigade *b,
>                                            apr_bucket *e)
> As I understand it, brigade b, is split in two. After the split, some of 
> the brigade is in a, and some of the brigade is in b.


> Is the brigade in a the leftmost part of the brigade, or the rightmost 
> part of the brigade?

All buckets before the bucket *e are removed from the brigade and placed
on the new brigade.

a = e to sentinel
b = b-a

> Which brigade will bucket e fall into, a or b?

The new brigade, a.

Davi Arnaut

View raw message