On Fri, 25 May 2001, barries wrote:
> BOS=Beginning Of Stream, like EOS=End Of Stream (I assume)
right, stream, not string.
> I didn't see any flags in the filter, filter chain, bucket brigade or
> bucket structures/APIs that indicate that this is the first brigade.
> Normally I think stateful filters just init the context before passing
> it in to ap_add_xxx_filter().
there is a macro to test that a bucket is first in the brigade, but i
don't know of anything to check that a brigade is the first brigade in the
chain.
> I might throw in a filter_init callback though and see if they like it.
> that solves a lot of these problems nicely, I think and extends the
> SetOutputFilter directive to enable stateful filter init.
sounds good.
> We're on the same page, but right now $ctx in the $r->add_xxx_filter(
> "foo", $ctx) is written to the f->ctx field that the modperl_filter_t
> comes to reside in. So I'm proposing a perl_ctx in the modperl_filter_t
> to carry Perl context and mapping the $ctx in that call to
> (modperl_filter_t *f->ctx)->perl_ctx
right, there is a slot already reserved for that:
typedef struct {
--->SV *data;
modperl_handler_t *handler;
PerlInterpreter *perl;
} modperl_filter_ctx_t;
not hooked up yet though.
> Hey, consistency is good, I just want the functionality.
i hear that.
> s/is_eos()/eof()/ then. And s/is_BOS()/!tell()/ for that matter. Can't
> really have seek(), since you might be on the 5th of 10 brigades, with
> the first four already send downstream.
right, unless we have the module in the middle that collects all the
brigades into one.
> > i have been planning todo the implementation, but if you want to beat me
> > to it, that's fine :)
>
> I'll take a swing at it next week. I can easily add the $f->eof and
> $f->tell(). Let me know what you want to do about passing a Perl
> context in to $r->add_xxx_filter() (ie do you want to retain the ability
> to set the f->ctx field to a C level pointer, and/or do you want to add
> a perl_ctx). Perhaps the ${r,c}->add_xxx_filter()s should take a perl
> context and the Apache::ap_add_filter( .... ) should take a C pointer.
the Perl-level context (set with ${r,c}->add_xxx_filter) should live in
modperl_filter_ctx_t.data, would be find to rename data perl_ctx or
whatever.
not sure what you mean by Apache::ap_add_filter ... C pointer part ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]