[svn:parrot] r48871 - branches/hash_inlined_func/src

luben at svn.parrot.org luben at svn.parrot.org
Wed Sep 8 22:09:40 UTC 2010


Author: luben
Date: Wed Sep  8 22:09:40 2010
New Revision: 48871
URL: https://trac.parrot.org/parrot/changeset/48871

Log:
resolve confilict in parrot_mark_hash functions

Modified:
   branches/hash_inlined_func/src/hash.c

Modified: branches/hash_inlined_func/src/hash.c
==============================================================================
--- branches/hash_inlined_func/src/hash.c	Wed Sep  8 22:09:30 2010	(r48870)
+++ branches/hash_inlined_func/src/hash.c	Wed Sep  8 22:09:40 2010	(r48871)
@@ -571,12 +571,13 @@
 {
     ASSERT_ARGS(parrot_mark_hash_keys)
 
-    if (hash->key_type == Hash_key_type_STRING) {
+    if (hash->key_type == Hash_key_type_STRING
+     || hash->key_type == Hash_key_type_STRING_enc) {
         parrot_hash_iterate(hash,
             PARROT_ASSERT(_bucket->key);
             Parrot_gc_mark_STRING_alive(interp, (STRING *)_bucket->key););
     }
-    else if (hash->key_type == Hash_key_type_PMC) {
+    else {
         parrot_hash_iterate(hash,
             PARROT_ASSERT(_bucket->key);
             Parrot_gc_mark_PMC_alive(interp, (PMC *)_bucket->key););
@@ -627,7 +628,8 @@
 {
     ASSERT_ARGS(parrot_mark_hash_both)
 
-    if (hash->key_type == Hash_key_type_STRING
+    if ((hash->key_type == Hash_key_type_STRING
+      || hash->key_type == Hash_key_type_STRING_enc)
     &&  hash->entry_type == (PARROT_DATA_TYPE) enum_hash_pmc) {
         parrot_hash_iterate(hash,
             PARROT_ASSERT(_bucket->key);


More information about the parrot-commits mailing list