perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject Re: Looking for magic in Apache->request
Date Mon, 02 Apr 2001 04:50:46 GMT
On Fri, 30 Mar 2001, Ken Williams wrote:
> The thing I can't figure out from the XS code is how/where
> Apache->request calls sv2request_rec(), which actually does the
> extraction work.  Somehow it's automatically converted, because I see no
> manual conversion in the Apache->request code below:

you don't need to change sv2request_rec(), the `Apache' typemap that calls
it needs to dig out the real request_rec for use with the apache api.

> void
> request(self, r=NULL)
>     SV *self
>     Apache r

what you can do is change 'Apache r' to 'SV *r', the global mp_request_rec
(in mod_perl.c) from an IV to SV.  then adjust things that fetch/modify
mp_request_rec acordingly.  this would require some SvREFCNT_{inc,dec}
managment, since the lifetime of mp_request_rec is longer than the object
you want it to point to.
i plan to catchup on 1.xx stuff after apachecon, i will look into it
then if you get stuck.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message