[svn:parrot] r39598 - branches/tt761_keys_revamp/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Jun 16 22:38:05 UTC 2009


Author: bacek
Date: Tue Jun 16 22:38:04 2009
New Revision: 39598
URL: https://trac.parrot.org/parrot/changeset/39598

Log:
[pmc] Hash.get_iter returns HashIterator now.

Modified:
   branches/tt761_keys_revamp/src/pmc/hash.pmc

Modified: branches/tt761_keys_revamp/src/pmc/hash.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/hash.pmc	Tue Jun 16 22:37:42 2009	(r39597)
+++ branches/tt761_keys_revamp/src/pmc/hash.pmc	Tue Jun 16 22:38:04 2009	(r39598)
@@ -607,18 +607,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        PMC * const iter     = pmc_new_init(INTERP, enum_class_Iterator, SELF);
-        PMC * const key      = pmc_new(INTERP, enum_class_Key);
-
-        SETATTR_Iterator_key(INTERP, iter, key);
-        PObj_get_FLAGS(key) |= KEY_hash_iterator_FLAGS;
-        SETATTR_Key_next_key(INTERP, key, (PMC *)INITBucketIndex);
-
-        /* -1 for an empty hash, 0 for a non-empty hash.  */
-        SETATTR_Key_int_key(INTERP, key,
-            parrot_hash_size(INTERP, (Hash *)SELF.get_pointer()) ? 0 : -1);
-
-        return iter;
+        return pmc_new_init(INTERP, enum_class_HashIterator, SELF);
     }
 
     VTABLE PMC *slice(PMC *key) {


More information about the parrot-commits mailing list