I've just tried building against a 64bitint perl-5.8.4, and there were quite a few
places were we were making assumptions that sizeof(int) == sizeof(pointer).
This patches tries to use INT2PTR and PTR2(IV|UV) where appropriate. This patch
passes all tests ok on perl-5.8.4 with and without 64bitint.
The INT2PTR is confusing, since it passes the type first and then the int :(
INT2PTR(PTR_TBL_t *, SvIV(sv));
But looks good (it's a perl macro after all).
However what this part of the patch has to do with the above comment?
> Index: xs/typemap > =================================================================== > --- xs/typemap (revision 126447) > +++ xs/typemap (working copy) > @@ -17,6 +17,9 @@ > T_VPTR > sv_setiv($arg, PTR2IV($var)); > > +T_UVPTR > + sv_setuv($arg, PTR2UV($var)); > +
> +T_UVPTR > + $var = INT2PTR($type, SvUV(SvROK($arg) ? SvRV($arg) : $arg)) > +
> Index: lib/ModPerl/WrapXS.pm
> ===================================================================
> --- lib/ModPerl/WrapXS.pm (revision 126447)
> +++ lib/ModPerl/WrapXS.pm (working copy)
> @@ -620,6 +620,7 @@
> 'apr_time_t' => 'T_APR_TIME',
> 'APR::Table' => 'T_HASHOBJ',
> 'APR::Pool' => 'T_POOLOBJ',
> + 'apr_size_t *' => 'T_UVPTR',
> );
>
> sub write_typemap {I don't see us using 'apr_size_t *' anywhere... in any case should probably be a separate commit :)
gozer++
-- __________________________________________________________________ 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]
