Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71073 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31712 invoked from network); 11 Jan 2014 20:17:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2014 20:17:20 -0000 Authentication-Results: pb1.pair.com header.from=ab@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ab@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.73.107 as permitted sender) X-PHP-List-Original-Sender: ab@php.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:59477] helo=klapt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/00-31310-DC6A1D25 for ; Sat, 11 Jan 2014 15:17:20 -0500 Received: by klapt.com (Postfix, from userid 33) id D2CD423D6080; Sat, 11 Jan 2014 21:17:13 +0100 (CET) Received: from 88.67.237.212 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Sat, 11 Jan 2014 21:17:13 +0100 Message-ID: In-Reply-To: <09595ef77b25972feab8e047bebdd37c.squirrel@webmail.klapt.com> References: <10f19e40b03ee19837010a988eb05706.squirrel@webmail.klapt.com> <2e9df2840916d6e72255764a08086e57.squirrel@webmail.klapt.com> <09595ef77b25972feab8e047bebdd37c.squirrel@webmail.klapt.com> Date: Sat, 11 Jan 2014 21:17:13 +0100 To: "Jakub Zelenka" Cc: "Hannes Magnusson" , "Nikita Popov" , "PHP Developers Mailing List" Reply-To: "Anatol Belski" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] 64 bit platform improvements for string length and integer From: ab@php.net ("Anatol Belski") 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