Cliff Woolley wrote:
>On Wed, 27 Feb 2002, Brian Pane wrote:
>
>>>> + if (!APR_BRIGADE_EMPTY(ctx->ssi_tag_brigade)) {
>>>> + for (;;) {
>>>> + apr_bucket *e = APR_BRIGADE_LAST(ctx->ssi_tag_brigade);
>>>> + if (e == APR_BRIGADE_SENTINEL(ctx->ssi_tag_brigade)) {
>>>> + break;
>>>> + }
>>>> + APR_BUCKET_REMOVE(e);
>>>> + APR_BRIGADE_INSERT_HEAD(bb, e);
>>>> + }
>>>> }
>>>>
>>I was thinking about APR_BRIGADE_CONCAT, but what I really needed
>>was APR_BRIGADE_PREPEND because _CONCAT would have left bb empty.
>>Is there a "prepend" variant anywhere?
>>
>
>The following is equivalent to the above (except it runs in constant
>time):
>
>/* prepend ctx->ssi_tag_brigade onto bb */
>APR_BRIGADE_CONCAT(ctx->ssi_tag_brigade, bb);
>APR_BRIGADE_CONCAT(bb, ctx->ssi_tag_brigade);
>
Thanks, I'll update this in mod_include later today.
>But I'd be fine with adding a prepend macro in the API if others agree
>it's useful.
>
+1
--Brian