Re: Possible GHashTable bug?
- From: Derek Simkowiak <dereks realloc net>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list redhat com
- Subject: Re: Possible GHashTable bug?
- Date: Wed, 4 Jul 2001 23:55:30 -0700 (PDT)
-> iterated element safe? Yes, probably. Not beyond that however,
-> so you'd have to be careful about what happened in response
-> to your foreach function in any case.
Ooh, ouch; I take this means I also cannot *add* elements while
within g_hash_table_foreach(). That may be a showstopper for me. How can
player1 fire a rocket (resulting in a new entity --the rocket-- for the
hash) if I can't add entities in the iteration of my main loop? I guess
I'll need a queue or something for post-foreach additions and removals.
Anyway, thanks for the help. It would be cool if there were an
Iterator for the GHashTable (g_hash_table_next() or some such) that would
still allow you to add/remove elements between calls.
Thanks,
Derek Simkowiak
dereks at realloc dot net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]