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