[svn:parrot] r39700 - trunk/src
petdance at svn.parrot.org
petdance at svn.parrot.org
Mon Jun 22 04:48:38 UTC 2009
Author: petdance
Date: Mon Jun 22 04:48:36 2009
New Revision: 39700
URL: https://trac.parrot.org/parrot/changeset/39700
Log:
more variable localizing
Modified:
trunk/src/key.c
Modified: trunk/src/key.c
==============================================================================
--- trunk/src/key.c Mon Jun 22 04:21:49 2009 (r39699)
+++ trunk/src/key.c Mon Jun 22 04:48:36 2009 (r39700)
@@ -617,11 +617,13 @@
{
ASSERT_ARGS(key_mark)
const UINTVAL flags = PObj_get_FLAGS(key) & KEY_type_FLAGS;
- PMC *next_key;
if (flags == KEY_string_FLAG) {
STRING *str_key;
GETATTR_Key_str_key(interp, key, str_key);
+
+ /* XXX str_key can be NULL from GETATTR_Key_str_key, */
+ /* so shouldn't be marked. */
Parrot_gc_mark_PObj_alive(interp, (PObj *)str_key);
}
@@ -630,13 +632,13 @@
* the bucket_index and not the next key component
* Note to self: shoot whoever thought this was a good idea.
*/
- if (flags == KEY_hash_iterator_FLAGS)
- return;
-
- /* if iteration hasn't started, above flag isn't set yet */
- GETATTR_Key_next_key(interp, key, next_key);
- if (next_key && (void *)next_key != (void *)INITBucketIndex)
- Parrot_gc_mark_PObj_alive(interp, (PObj *)next_key);
+ if (flags != KEY_hash_iterator_FLAGS) {
+ PMC *next_key;
+ /* if iteration hasn't started, above flag isn't set yet */
+ GETATTR_Key_next_key(interp, key, next_key);
+ if (next_key && (void *)next_key != (void *)INITBucketIndex)
+ Parrot_gc_mark_PObj_alive(interp, (PObj *)next_key);
+ }
}
More information about the parrot-commits
mailing list