Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42459 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94033 invoked from network); 3 Jan 2009 13:13:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2009 13:13:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.244 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.132.244 an-out-0708.google.com Received: from [209.85.132.244] ([209.85.132.244:42445] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/22-12810-D546F594 for ; Sat, 03 Jan 2009 08:13:01 -0500 Received: by an-out-0708.google.com with SMTP id b2so2466466ana.38 for ; Sat, 03 Jan 2009 05:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=S8T3Ky7w2crLagVaqo4MaRtxPBKjqfnuvZ/FmC+bemI=; b=ljz0VeiDg/jv0rprvx43w0hnZCvf8JKgiAhzRDQ0cASUScjSUItAc8hrqJHOSwZSB+ 9U9tbLtD+tsZMHuyDJnfb6/5wvuaHDwc+WthKQofgv6Gsba+NQPnHPd2nHzcPyCl2bpr 4NU2RRlWAaKOLaH2Oc9G07OjiXBgAwUrcNLQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=WwutTBVCloWQ+D3CVc8A0X9oppIuazGuYbx6Nja27VD80FEjAzzGHowIlKFDPkXp3t 2WSLaadBdzGnh7mrW8OLALZRa3yGR/JBUB+AfttU9zxsAguXd7AGt2y335n50BPmTCQO 6hWD3idgelcBU7qLY7gqll1Yya24JnY9uK3eM= Received: by 10.100.251.8 with SMTP id y8mr10262356anh.16.1230988378556; Sat, 03 Jan 2009 05:12:58 -0800 (PST) Received: from ?192.168.1.3? ([189.24.9.99]) by mx.google.com with ESMTPS id c1sm32560946ana.16.2009.01.03.05.12.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Jan 2009 05:12:58 -0800 (PST) To: shire@php.net Cc: PHP Internals List In-Reply-To: <1230985890.3243.6.camel@pena> References: <495EF18A.7040206@php.net> <1230985623.3243.3.camel@pena> <1230985890.3243.6.camel@pena> Content-Type: text/plain; charset=utf-8 Date: Sat, 03 Jan 2009 11:13:41 -0200 Message-ID: <1230988421.3243.8.camel@pena> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] PATCH: bug #46701 From: felipensp@gmail.com (Felipe Pena) Em Sáb, 2009-01-03 às 10:31 -0200, Felipe Pena escreveu: > Em Sáb, 2009-01-03 às 10:27 -0200, Felipe Pena escreveu: > > Em Sex, 2009-01-02 às 21:03 -0800, shire escreveu: > > > I've created a patch for bug #46701 (http://bugs.php.net/bug.php?id=46701) but it requires Zend changes, it can be found at the links below for all branches. I've verified all tests pass. We may want to verify it for other architectures due to the nature of it being a float conversion problem, I tested on Intel OS X 10.5.5. But this should at least be equivalent to $array[intval($double)] now. > > > > > > > > > http://tekrat.com/patches/bug46701.php6.patch > > > http://tekrat.com/patches/bug46701.php53.patch > > > http://tekrat.com/patches/bug46701.php52.patch > > > > > > > > > > I suppose that should we also change the fetch (ZEND_FETCH_DIM_*)? > > > > And probably: > > case IS_DOUBLE: > > index = (long)Z_DVAL_P(dim); > > goto num_index; > > > > And zend_execute.c (zend_fetch_dimension_address_inner) will be > > superfluous with this change. > > Errr, I mean, the case IS_DOUBLE stuff in > zend_fetch_dimension_address_inner will be superfluous. > In the end, I see that it requires the macro too, hehe. So, a little change in your patch: - case IS_DOUBLE: - index = (long)Z_DVAL_P(dim); + case IS_DOUBLE: { + DVAL_TO_LVAL(Z_DVAL_P(dim), index); goto num_index; - + } http://felipe.ath.cx/diff/shire-patch-change-46701-5_3.diff > > > > > > > Thanks, > > > -shire > > > -- Regards, Felipe Pena