Skip to content
Tcl Source Code Artifact [218ca75a14]
Login

Artifact [218ca75a14]

Artifact 218ca75a14d12db53d8c339f1acecec7ab586ebd86052453075cf69fff42c96c:

Wiki page [branch/c11-full-hash-foreach] by dkf on 2025-10-27 11:48:24.
D 2025-10-27T11:48:24.386
L branch/c11-full-hash-foreach
N text/x-markdown
P ed7c15346cfb960d839bbad61bbcf85c458d1b9da2e210933ba615750b7bc319
U dkf
W 611
Extended version of [`c11-tcloo-foreach`](https://core.tcl-lang.org/tcl/timeline?r=c11-tcloo-foreach) that applies those changes to the rest of Tcl.

Additionally needs:

* `FOREACH_HASH_ENTRY` (for those cases where the `Tcl_HashEntry*` needs to be accessible.)
* `FOREACH_HASH_ENTRY_REINIT` (for those cases where `Tcl_FirstHashEntry()` is called on every iteration.)

I'm not sure whether all the cases that use `FOREACH_HASH_ENTRY_REINIT` _should_ do so; some may be over-cautious. Ones where callbacks can add to the hash table while it is being iterated over for deletion, those definitely need it.
Z 2260f5b4369d960e274bae6420e764bb