Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10610 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49518 invoked by uid 1010); 18 Jun 2004 20:08:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48497 invoked by uid 1007); 18 Jun 2004 20:08:18 -0000 Message-ID: <20040618200818.48469.qmail@pb1.pair.com> To: internals@lists.php.net Date: Fri, 18 Jun 2004 22:08:16 +0200 User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <40D16253.4000003@php.net> <40D33113.7050505@php.net> In-Reply-To: <40D33113.7050505@php.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.126.21.70 Subject: Re: [PHP-DEV] Re: 64-bit bugsquash From: abies@php.net (Ard Biesheuvel) The problem with ints and longs is not their sizes, but the fact that people use them interchangeably, their sizes being equal coincidentally on 32-bit architectures. Most of the bugs occur when pointers to these variables are passed as arguments to variadic functions like zend_parse_parameters(), which are not subject to pointer type checking by the compiler. > Sorry but this idea is out of question. The idea was always that PHP is > 64 bit capable as soon you run it on a 64 bit machine. Same for 128 bit Some data structures [like IPv4 addresses, for instance], are 32-bits regardless of the architecture, so some code needs its variable sizes to be defined explicitly. Defining intxx types might be useful in this respect, but it won't fix the problem mentioned before. >> typedef __int8 zend_int8; >> typedef __int16 zend_int16; >> typedef __int32 zend_int32; >> typedef __int64 zend_int64; >> typedef unsigned __int8 zend_uint8; >> typedef unsigned __int16 zend_uint16; >> typedef unsigned __int32 zend_uint32; >> typedef unsigned __int64 zend_uint64; Arent't the __intxx types MSVC-only ? -- Ard