Skip to content

Conversation

@Girgias
Copy link
Member

@Girgias Girgias commented Mar 10, 2024

No description provided.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One remark: last commit is not entirely correct. First two commits are correct.

@Girgias Girgias force-pushed the spl-object-storage-refactor branch from e2b4e23 to 6945677 Compare March 17, 2024 23:37
@@ -1,5 +1,5 @@
--TEST--
SPL: ArrayObject
Bug #70053 (MutlitpleIterator array-keys incompatible change in PHP 7)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in MultipleIterator

* need to convert it to just use a normal backing HashTable
* in the meantime we skip this whole block if it is this case. */
if (parent == spl_ce_MultipleIterator) {
goto end;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now harder to follow the logic, I'm not sure this is an improvement.
If you fix this TODO and this code in a follow up then it's fine I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am planning to, but as I'm going on holiday I will leave this PR open so that I dont' forget about it.

@Girgias
Copy link
Member Author

Girgias commented Apr 30, 2024

I am closing this as I don't think using a normal HashTable for spl_ce_MultipleIterator is possible.

My initial idea was to use the "key" as the actual key and loop through the HashTable when attempting to remove an iterator, however this doesn't work as null can be a valid key on top of int and string.

Using the object handle ID is not feasible either, and I don't think I'm comfortable using some other way to detect different objects (e.g. the pointer address of the object).

@Girgias Girgias closed this Apr 30, 2024
@Girgias Girgias deleted the spl-object-storage-refactor branch April 30, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants