[svn:parrot] r45328 - trunk/src/pmc

petdance at svn.parrot.org petdance at svn.parrot.org
Tue Mar 30 21:46:09 UTC 2010


Author: petdance
Date: Tue Mar 30 21:46:09 2010
New Revision: 45328
URL: https://trac.parrot.org/parrot/changeset/45328

Log:
headerizing statics. Removed unused return value from advance_to_next()

Modified:
   trunk/src/pmc/hashiterator.pmc

Modified: trunk/src/pmc/hashiterator.pmc
==============================================================================
--- trunk/src/pmc/hashiterator.pmc	Tue Mar 30 21:45:27 2010	(r45327)
+++ trunk/src/pmc/hashiterator.pmc	Tue Mar 30 21:46:09 2010	(r45328)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -51,6 +51,17 @@
 
 /* HEADERIZER HFILE: none */
 /* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
+
+static void advance_to_next(PARROT_INTERP, ARGMOD(PMC *self))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*self);
+
+#define ASSERT_ARGS_advance_to_next __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(self))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
 /*
@@ -58,8 +69,10 @@
 Advance to next position. Return found (if any) HashBucket.
 
 */
-static HashBucket*
-advance_to_next(PARROT_INTERP, PMC *self) {
+
+static void
+advance_to_next(PARROT_INTERP, ARGMOD(PMC *self))
+{
     Parrot_HashIterator_attributes * const attrs  = PARROT_HASHITERATOR(self);
     HashBucket                            *bucket = attrs->bucket;
 
@@ -76,7 +89,8 @@
     }
     attrs->bucket = bucket;
     attrs->elements--;
-    return bucket;
+
+    return;
 }
 
 pmclass HashIterator extends Iterator no_ro auto_attrs {
@@ -129,7 +143,7 @@
 */
 
     VTABLE void mark() {
-        PMC *hash = PARROT_HASHITERATOR(SELF)->pmc_hash;
+        PMC * const hash = PARROT_HASHITERATOR(SELF)->pmc_hash;
         Parrot_gc_mark_PMC_alive(INTERP, hash);
         /* We don't mark underlying parrot_hash. Hash PMC will mark it */
     }


More information about the parrot-commits mailing list