perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [patch mp2] Perl -Duse64bitint
Date Thu, 27 Jan 2005 00:46:12 GMT
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
>> Philippe M. Chiasson wrote:
>>> 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).
> I guess it isn't 100% clear, true, so how about adding:
> #define MP_INT2PTR(int, type) INT2PTR(type, int)

I guess it's nicer, but since it's a core macro let's just stick to it. 
This is because we will soon start using this macro all over other 
projects, including XS code, so it's better to not get confused. So let's 
just use the confusing macro. It'll be less confusing when we get used to it.

>> However what this part of the patch has to do with the above comment?

> It's autogenerated, but a good example will be in WrapXS/APR/Socket/

OK, right, I was grepping the checked out source. So no questions asked.


p.s. still better commit those in two chunks (int, then long) :)

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

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

View raw message