You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/12/11 07:30:22 UTC

Re: moving mpxs_cleanup_t and mpxs_cleanup_run to modperl_common_util

[subject change]

Randy Kobes wrote:

>>The only minor problem is that I had to duplicate code from APR_Pool.h:
>>
>>/* XXX: the mpxs_cleanup_t and mpxs_cleanup_run are almost dups with
>>  * code in APR__Pool.h (minus interpr member which is not used
>>  * here. They should be moved to modperl_common_util - the problem is
>>  * modperl_interp_t *, which can't live in modperl_common_* since it
>>  * creates a dependency on mod_perl. A possible solution is to use
>>  * void * for that slot and cast it to modperl_interp_t * when used
>>  */
>>
>>Anybody wants to tackle this?  I think the pool stuff is still dependent
>>on mod_perl, since it has modperl_interp_t in it.
> 
> 
> Here's a partial stab at this, moving mpxs_cleanup_t to
> src/modules/perl/modperl_common_types.h:
[...]
> ======================================================================
> I'm looking at doing the same for mpxs_cleanup_run, but
> am having a problem at the moment with getting the
> declaration of modperl_opt_interp_unselect in the right
> place.

Thanks Randy.

Heh, I did that part too and but gave up on the modperl_opt_interp_unselect :)

What I don't get is how does it work now if APR::Pool references 
modperl_interp type inside of it and it sort of works w/o modperl.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: moving mpxs_cleanup_t and mpxs_cleanup_run to modperl_common_util

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:

>>Heh, I did that part too and but gave up on the
>>modperl_opt_interp_unselect :)

I forgot to mention that I've stopped there, because I won't have been 
able to see any problems, since on linux the linker doesn't complain about 
missing but unused symbols.

>>What I don't get is how does it work now if APR::Pool references
>>modperl_interp type inside of it and it sort of works w/o modperl.
> 
> 
> That occurred to me too ... APR::Pool must see the
> definition modperl_interp_t (with or without the moving of
> mpxs_cleanup_t to modperl_common_types.h), even though
> (presumably) it doesn't need mod_perl (I suppose due to the
> conditionals present that test if an "interp" exists).

But the struct itself doesn't have any conditional. that's what confuses 
me - your linker doesn't complain about that.

> But
> does this mean there's a (weak?) dependency still in
> APR::Pool on mod_perl?

I'm not sure what does it mean it the compiler/linker terms, but there is 
certainly a weak dependancy :)


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: moving mpxs_cleanup_t and mpxs_cleanup_run to modperl_common_util

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 11 Dec 2004, Stas Bekman wrote:

> [subject change]
>
> Randy Kobes wrote:
>
> >>The only minor problem is that I had to duplicate code from APR_Pool.h:
> >>
> >>/* XXX: the mpxs_cleanup_t and mpxs_cleanup_run are almost dups with
> >>  * code in APR__Pool.h (minus interpr member which is not used
> >>  * here. They should be moved to modperl_common_util - the problem is
> >>  * modperl_interp_t *, which can't live in modperl_common_* since it
> >>  * creates a dependency on mod_perl. A possible solution is to use
> >>  * void * for that slot and cast it to modperl_interp_t * when used
> >>  */
> >>
> >>Anybody wants to tackle this?  I think the pool stuff is still dependent
> >>on mod_perl, since it has modperl_interp_t in it.
> >
> >
> > Here's a partial stab at this, moving mpxs_cleanup_t to
> > src/modules/perl/modperl_common_types.h:
> [...]
> > ======================================================================
> > I'm looking at doing the same for mpxs_cleanup_run, but
> > am having a problem at the moment with getting the
> > declaration of modperl_opt_interp_unselect in the right
> > place.
>
> Thanks Randy.
>
> Heh, I did that part too and but gave up on the
> modperl_opt_interp_unselect :)
>
> What I don't get is how does it work now if APR::Pool references
> modperl_interp type inside of it and it sort of works w/o modperl.

That occurred to me too ... APR::Pool must see the
definition modperl_interp_t (with or without the moving of
mpxs_cleanup_t to modperl_common_types.h), even though
(presumably) it doesn't need mod_perl (I suppose due to the
conditionals present that test if an "interp" exists). But
does this mean there's a (weak?) dependency still in
APR::Pool on mod_perl?

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org