Geoffrey Young wrote:

Stas Bekman wrote:


I think we shouldn't support:

Apache->server_root_relative and equivalents, but only:

($r|$s|$c)->server_root_relative(...) and
Apache::server_root_relative($pool, ...)

because users will get bad memory leaks when a global pool is used to
allocate memory in requests. We should support the non-(pool|$r|$c|$s)
argument functions only in compat


ok, the attached patch takes care of this.  the only hitch is that
Apache->server_root_relative in compat.pm collides, so it needed to follow
the new override/restore API.

Beautiful work, Geoff.


The only comment I have is we should probably use DEFINEs for xs wrappers, since your functions don't do anything but pass the args through as is.

the comments here are confusing. This is a generic internal
modperl_sv2pool function and used in other places


actually, it's not that I can see. maybe it used to be?

could be.


anyway, as a result of our new syntax and the fact that sv2pool isn't used
elsewhere, I've adjusted the function considerably - it no longer returns a
global pool at all and now supports properly formatted subclasses.

So if it's not used anywhere else may be it should become static then and removed from modperl_util.h?


> it no longer returns a global pool at all

I think it's a goodness not to use the global pool for any public APIs that could be used at request run-time. Makes it a tiny bit harder on users, but at the same time it makes harder for them to shoot themselves into their foot.

> and now supports properly formatted subclasses.

goodness!

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to