Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39213 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13757 invoked from network); 23 Jul 2008 07:26:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2008 07:26:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:56852] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/10-12534-73DD6884 for ; Wed, 23 Jul 2008 03:26:48 -0400 Received: from host95.paramount.wayport.net (unknown [65.249.24.95]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id F029A11DAC7; Wed, 23 Jul 2008 09:26:39 +0200 (CEST) Date: Wed, 23 Jul 2008 09:26:31 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1917875093.20080723092631@marcus-boerger.de> To: "Arnaud Le Blanc" CC: Marcus Boerger , "internals" , Etienne Kneuss In-Reply-To: <200807230836.54055.arnaud.lb@gmail.com> References: <200807081549.36758.arnaud.lb@gmail.com> <200807221123.47349.arnaud.lb@gmail.com> <12110462146.20080723011614@marcus-boerger.de> <200807230836.54055.arnaud.lb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [PATCH] RecursiveTreeIterator implementation From: helly@php.net (Marcus Boerger) Hello Arnaud, Wednesday, July 23, 2008, 8:36:53 AM, you wrote: > Hello Marcus, > On Wednesday 23 July 2008 01:16:14 Marcus Boerger wrote: >> Hello Arnaud, >> >> Tuesday, July 22, 2008, 11:23:47 AM, you wrote: >> >> > Hello, >> >> >> > Care to look into the MultipleIterator next? >> >> >> >> > That's done, for 5_3 [1] and HEAD [2]. >> > And a test [3][4] covering mostly all the cases. >> >> > [1] http://arnaud.lb.s3.amazonaws.com/MultipleIterator_5_3.patch >> > [2] http://arnaud.lb.s3.amazonaws.com/MultipleIterator_HEAD.patch >> > [3] http://arnaud.lb.s3.amazonaws.com/multiple_iterator_001_5_3.phpt >> > [4] http://arnaud.lb.s3.amazonaws.com/multiple_iterator_001_HEAD.phpt >> >> Great work once more. I just moved the stuff all into spl_observer.c to >> avoid increasing the amount of stuff that gets exported in the headers. >> I also did a few minor tweaks and cleanups, nothing important though. >> >> - setFlags parses directly into &intern->flags which is a long for that >> reason >> - added !EG(exception) for the loops, though I have another patch that will >> make exception handling better >> >> I've also upgraded you, you've got php-src access now, use it wisely :-) > Thanks :) I will try to not break everything ;) > I did not found anything about "Spl(Array|Index|Member)Reference" on the TODO, > are there any discussion on that ? Nope. My idea was to have an overloaded object that proxies writes to an Arraym an Index and so forth. When you write to such an instance than instead the saved reference would be written to. class SplArrayReference { function __construct(Array &$array, $index) { $this->array = &$array; $this->index = $index; } function __set($value) { $this->array[$this->index] = $value; } //...... } Where __set is the c-level zend_object_set_t set handler. Given its concept, structure and the fact that we have closures now, it would probably better to do those in pecl/Spl_Types. But I might be wrong in my assumtion that all of these can be done by closures anyway. Best regards, Marcus