MP_dINTERP_PUTBACK(interp);
MP_INTERP_PUTBACK(interp);
int modperl_run_filter(modperl_filter_t *filter){    AV *args = Nullav;    int status;    modperl_handler_t *handler =        ((modperl_filter_ctx_t *)filter->f->ctx)->handler;    request_rec *r = filter->f->r;    conn_rec    *c = filter->f->c;    server_rec  *s = r ? r->server : c->base_server;    apr_pool_t  *p = r ? r->pool : c->pool;    MP_dINTERP_SELECT(r, c, s);    modperl_handler_make_args(aTHX_ &args,                              "Apache::Filter", filter->f,                              "APR::Brigade",                              (filter->mode == MP_INPUT_FILTER_MODE                               ? filter->bb_out                               : filter->bb_in),                              NULL);    modperl_filter_mg_set(aTHX_ AvARRAY(args)[0], filter);    if (filter->mode == MP_INPUT_FILTER_MODE) {        av_push(args, newSViv(filter->input_mode));        av_push(args, newSViv(filter->block));        av_push(args, newSViv(filter->readbytes));    }    /* XXX filters are VOID handlers.  should we ignore the status? */    if ((status = modperl_callback(aTHX_ handler, p, r, s, args)) != OK) {        status = modperl_errsv(aTHX_ status, r, s);    }    SvREFCNT_dec((SV*)args);    /* when the streaming filter is invoked it should be able to send     * extra data, after the read in a while() loop is finished.     * Therefore we need to postpone propogating the EOS bucket, up     * until the filter handler is returned and only then send the EOS     * bucket if the stream had one.     */    if (filter->seen_eos) {        filter->eos = 1;        filter->seen_eos = 0;    }    if (filter->mode == MP_INPUT_FILTER_MODE) {        if (filter->bb_in) {            /* in the streaming mode filter->bb_in is populated on the             * first modperl_input_filter_read, so it must be             * destroyed at the end of the filter invocation             */            apr_brigade_destroy(filter->bb_in);            filter->bb_in = NULL;        }        MP_FAILURE_CROAK(modperl_input_filter_flush(filter));    }    else {        MP_FAILURE_CROAK(modperl_output_filter_flush(filter));    }    MP_dINTERP_PUTBACK(interp);    MP_TRACE_f(MP_FUNC, MP_FILTER_NAME_FORMAT               "return: %d\n", handler->name, status);        return status;}