Am Dienstag, 3. April 2007 06:56 schrieb Allison Randal:
> > The major problem is probably, that there are no specific iterator
> > interface vtable functions that an iterator would use.
>
> Isn't that what nextkey_keyed is for? Though, looking at it, it seems
> more like part of the problem of ent
Leopold Toetsch wrote:
The former is also implementing the Hash iteration internals. E.g.
switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
case KEY_hash_iterator_FLAGS:
...
return parrot_hash_get_idx(INTERP, hash, key);
Yeah, that part's pretty
Am Montag, 2. April 2007 08:24 schrieb Allison Randal:
> The significant differences between the two are that Iterator's
> shift_pmc throws an exception if the iteration key is -1 while
> shift_string doesn't bother to check (it probably should), and
> shift_string calls VTABLE_get_string_keyed on
Jonathan Worthington wrote:
Hi,
Earlier tonight I tried to iterate a hash. I have somewhat thoughtlessly
been doing things like:
PMC *iter = VTABLE_get_iter(interp, some_hash);
while (VTABLE_get_bool(iter)) {
PMC *key_pmc = VTABLE_shift_pmc(interp, iter);
STRING *key = VTABLE_get_stri
Hi,
Earlier tonight I tried to iterate a hash. I have somewhat thoughtlessly
been doing things like:
PMC *iter = VTABLE_get_iter(interp, some_hash);
while (VTABLE_get_bool(iter)) {
PMC *key_pmc = VTABLE_shift_pmc(interp, iter);
STRING *key = VTABLE_get_string(interp, key_pmc);
...
}