Re: [RFC] 64 bit platform improvements for string length and integer

From: Date: Sat, 11 Jan 2014 20:17:13 +0000
Subject: Re: [RFC] 64 bit platform improvements for string length and integer
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-71073@lists.php.net to get a copy of this message
On Sat, January 11, 2014 20:34, Anatol Belski wrote:

>>
>> If I understood correctly you are suggesting using php_int_t for n
>> (defined
>> in compat header as long if not defined in php.h)? The problem is that
>> the type would be dependent on PHP versions and when you need to be sure
>>  that it's a long (which might be the case when you pass it to the
>> another lib function), then you need to check PHP_API_VERSION and in
>> case it's not long, you have to do range check.
> If a library expects long, in the new code that's the issue on 32 bit
> windows only. So yes, probably the way you describe is plausible, check
> PHP_WIN32 and PHP_API_VERSION.

Err, it's issue only on windows 64 bit, as php_int_t is __int64 there. So
the macros needs check _WIN64 only, not PHP_WIN32.

Regards

Anatol


Thread (80 messages)

« previous php.internals (#71073) next »