On Sat, Sep 13, 2014 at 9:23 PM, Ruediger Pluem <rpl...@apache.org> wrote:
>
> How about to require that the caller of ap_filter_setaside_brigade just hands 
> over a non NULL bucket_brigade as
> buffered_bb (so changing apr_bucket_brigade ** to apr_bucket_brigade *) and 
> that it should handle *deferred_write_pool
> as opaque structure and that it should not allocate from it?

Can that be enforced by the API as I proposed?

> Or we request the caller to provide a non NULL
> deferred_write_pool as well (so changing apr_pool_t ** to apr_pool_t *) and 
> warn the caller that the pool might be
> cleared during the call of ap_filter_setaside_brigade. Hence solving all 
> lifetime issues would be in the responsibility
> of the caller.

IMHO that would complicate the caller's job/code, probably doing
what's in ap_filter_setaside_brigade() now (use a subpool to avoid the
leak, manage the cleanup..). The function would become a simple
ap_save_brigade() call (and data_in_output_filter++), no real gain...

Regards,
Yann.

Reply via email to