Author: allison
Date: Sun Apr  1 23:15:49 2007
New Revision: 17942

Modified:
   trunk/src/pmc/hash.pmc
   trunk/src/pmc/iterator.pmc

Log:
Consistency fixes, when you define a local variable for the PMC struct val, use
it, and try to stick to one way of retrieving the integer value of a key.


Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc      (original)
+++ trunk/src/pmc/hash.pmc      Sun Apr  1 23:15:49 2007
@@ -582,8 +582,7 @@
             default:
                 keystr = make_hash_key(INTERP, key);
         }
-        b = parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF),
-                                        keystr);
+        b = parrot_hash_get_bucket(INTERP, hash, keystr);
         if (b == NULL) {
             return PMCNULL;
         }

Modified: trunk/src/pmc/iterator.pmc
==============================================================================
--- trunk/src/pmc/iterator.pmc  (original)
+++ trunk/src/pmc/iterator.pmc  Sun Apr  1 23:15:49 2007
@@ -505,7 +505,7 @@
         PMC * const key = PMC_struct_val(SELF);
         PMC * const agg = PMC_pmc_val(SELF);
         PMC *ret;
-        if (key_integer(INTERP, key) == -1) {
+        if (PMC_int_val(key) == -1) {
             real_exception(INTERP, NULL, E_StopIteration, "StopIteration");
             return NULL;
         }

Reply via email to