httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_core.c http_protocol.c util_filter.c
Date Thu, 14 Sep 2000 20:02:31 GMT

Okay, you've convinced me, I'm removing my veto, and the patch shouldn't
be backed out.

Ryan

> no, f->ctx checking only needs to be there for modules that use a ctx,
> right?  and, f->ctx isn't always something allocated from an apache pool.
> what's the difference if the ctx is set when calling ap_add_filter()
> vs. some other time?  if what you're saying is really a problem, then why
> bother having f->ctx at all?
> for filters that don't use ctx, they can just ignore it.  for those that
> do, e.g. Perl:
> 
> CV *cv;
> if (f->ctx) {
>     cv = (CV*)f->ctx; /* already have a reference to the subroutine */
> }
> else {
>     /* lookup a reference to the subroutine using the filter name */
>     cv = perl_get_cv(f->frec->name, FALSE);
> }
> 
> ...
> perl_call_sv((SV*)cv, ...)
> ...
> 
> again, there are cases when the ctx is only know when ap_add_filter() is
> called, e.g. at request time a Perl module calls:
> 
> $r->add_filter($name, sub { my $filter = shift ...});
> 
> if mod_perl can't save the anonymous 'sub {}' reference (which has no
> name for get_cv() to do a lookup) into the ctx when it calls add_filter(),
> then mod_perl needs to maintain it's own table, which is much more painful
> than simply checking if (f->ctx) {} else {}
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message