Hi,
I have seen a "NEEDS DEVELOPER" flag on the TODO for the "Implement
RecursiveTreeIterator in C" task, so I would like to propose my
implementation [1].
Currently it follows the PHP implementation, except that it does not have a
$prefix public property (how about a private property and a setter method ?).
I hope this patch will be useful. Please say me if anything is wrong with it.
[1] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator.patch
[2] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator-phpt.tar.bz2
Regards,
Arnaud
Hello Arnaud,
Tuesday, July 8, 2008, 3:49:36 PM, you wrote:
Hi,
I have seen a "NEEDS DEVELOPER" flag on the TODO for the "Implement
RecursiveTreeIterator in C" task, so I would like to propose my
implementation [1].
Currently it follows the PHP implementation, except that it does not have a
$prefix public property (how about a private property and a setter method ?).
I hope this patch will be useful. Please say me if anything is wrong with it.
[1] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator.patch
[2] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator-phpt.tar.bz2
Regards,
Looks very good! Many thanks.
Best regards,
Marcus
Looks very good! Many thanks.
Best regards,
Marcus
Thanks :)
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?
marcus
Wednesday, July 9, 2008, 4:16:20 PM, you wrote:
Looks very good! Many thanks.
Best regards,
Marcus
Thanks :)
Best regards,
Marcus
Hello,
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Ok, I made it [1]. I never walked through the PHP6 code until now, I hope this
is correct.
getPrefix and getPostfix return a binary or unicode string depending on
UG(unicode).
getEntry returns the original value if it is binary or unicode. Else it
converts it depending on UG(unicode), as the purpose of this method is to
cast to string.
The convertion from array to string in getPrefix throws E_NOTICE
errors, so I
had to change the error_reporting setting in my test cases [2] for them to
pass. I don't know if I may remove these errors or not.
current returns the type returned by getEntry.
key acts like getEntry.
I added a test (005) for the returned types. And an other (006) to test the
case where RecursiveTreeIterator got an IteratorAggregate as first param. All
tests should pass on 5.3 except 005.
[1] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator_HEAD.patch
[2] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator-phpt.tar.bz2
Arnaud
Hello Arnaud,
Thursday, July 10, 2008, 2:16:33 PM, you wrote:
Hello,
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Ok, I made it [1]. I never walked through the PHP6 code until now, I hope this
is correct.
getPrefix and getPostfix return a binary or unicode string depending on
UG(unicode).
getEntry returns the original value if it is binary or unicode. Else it
converts it depending on UG(unicode), as the purpose of this method is to
cast to string.
The convertion from array to string in getPrefix throws
E_NOTICE
errors, so I
had to change the error_reporting setting in my test cases [2] for them to
pass. I don't know if I may remove these errors or not.
current returns the type returned by getEntry.
key acts like getEntry.
I added a test (005) for the returned types. And an other (006) to test the
case where RecursiveTreeIterator got an IteratorAggregate as first param. All
tests should pass on 5.3 except 005.
[1] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator_HEAD.patch
[2] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator-phpt.tar.bz2
Arnaud
Slightly modified and applied. Thanks for the good work.
Care to look into the MultipleIterator next?
marcus
Best regards,
Marcus
Hello
--snip--
Care to look into the MultipleIterator next?
If you do intend to do it, (or if you don't), please let us know so we
can prioritize things, and eventually focus on other things, before
the 24th.
Thanks in advance
--
Etienne Kneuss
http://www.colder.ch
Men never do evil so completely and cheerfully as
when they do it from a religious conviction.
-- Pascal
Hello,
Slightly modified and applied. Thanks for the good work.
Thanks :)
Care to look into the MultipleIterator next?
Ok, I will do that.
Etienne, I think I can do that before the 24th.
Regards,
Arnaud
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
Regards,
Arnaud
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 :-)
Best regards,
Marcus
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.phptGreat 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 betterI'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 ?
Regards,
Arnaud
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.phptGreat 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 betterI'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
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Hi,
I would like to add a method to allow to change the prefix strings, but are
there any chances for this patch to be commited into 5.3 ?
Regards,
Arnaud
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if
you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Hi,
I would like to add a method to allow to change the prefix strings,
but are
there any chances for this patch to be commited into 5.3 ?
from the RM perspective .. if you get it commited before the 24th its
ok with us .. the usefulness or relevance of this will be decided by
Marcus/Etienne.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org
Hello Arnaud,
I will commit it afte I have reviewed and changed it a bit. Right now you
ignore conversoin errors. I'll change this to throw exceptions to be inline
with other code. However I am in Tel Aviv right now for a company work
meeting, so I have little time this week.
marcus
Wednesday, July 16, 2008, 5:47:20 PM, you wrote:
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Hi,
I would like to add a method to allow to change the prefix strings, but are
there any chances for this patch to be commited into 5.3 ?
Regards,
Arnaud
Best regards,
Marcus
Hello,
Ok, that's why I said that I didn't know what to do with these conversions. At
now I just left the E_NOTICE
errors.
Regards
Hello Arnaud,
I will commit it afte I have reviewed and changed it a bit. Right now you
ignore conversoin errors. I'll change this to throw exceptions to be inline
with other code. However I am in Tel Aviv right now for a company work
meeting, so I have little time this week.marcus
Wednesday, July 16, 2008, 5:47:20 PM, you wrote:
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
Hello Arnaud,
if you can provicde the same for HEAD then I'll submit it. And if
you're
fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
much time does he have?marcus
Hi,
I would like to add a method to allow to change the prefix strings, but
are
there any chances for this patch to be commited into 5.3 ?Regards,
Arnaud
Best regards,
Marcus