Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67601 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16087 invoked from network); 1 Jun 2013 09:53:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2013 09:53:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@hristov.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@hristov.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hristov.com from 91.196.124.214 cause and error) X-PHP-List-Original-Sender: php@hristov.com X-Host-Fingerprint: 91.196.124.214 more.superhosting.bg Linux 2.6 Received: from [91.196.124.214] ([91.196.124.214:52657] helo=more.superhosting.bg) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/73-02347-EA4C9A15 for ; Sat, 01 Jun 2013 05:53:51 -0400 Received: from androto.ddns.playtime.bg ([87.121.162.85]:43433 helo=[192.168.20.117]) by more.superhosting.bg with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1UiiVO-002Zqe-QU; Sat, 01 Jun 2013 12:53:46 +0300 Message-ID: <51A9C4A6.3000802@hristov.com> Date: Sat, 01 Jun 2013 11:53:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Anthony Ferrara CC: Derick Rethans , "internals@lists.php.net" References: <6dae6c81-3e50-42f3-9a7e-87eedf8861d4@email.android.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - more.superhosting.bg X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com X-Get-Message-Sender-Via: more.superhosting.bg: authenticated_id: php@hristov.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] 5.NEXT Integer and String type modifications From: php@hristov.com (Andrey Hristov) Hi, On 05/31/2013 10:03 PM, Anthony Ferrara wrote: > Derick, > > > In principle I think this is great thing to do. Not having a 64 bit type is >> annoying. I'm a bit curious on how this is going to work with all sorts of >> object wrappers that are now in place as workaround. And casting int64 to >> int32 needs to very well looked at as well. >> >> > As far as the casting, my first reaction would be to raise an > E_ENGINE_NOTICE on data loss (casting from int64 to int32 with ints > 32 > bit) and then adjusting the value to the nearest representable value > (LONG_MAX or LONG_MIN). In other words, it may need to be more than a > simple cast (an inline function perhaps)... > > As far as object wrappers, any particular examples that you're thinking of? > > Thanks for the thoughts > > Anthony > what about new type IS_LONG64, new field in union and new set of macros for this type. New extensions or rewritten extensions will use the new macros. In 2-3 major versions, 5.8 for example, old macros will be dropped. Enough time extensions to be ported to the new macros. Best, Andrey