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

petdance at svn.parrot.org petdance at svn.parrot.org
Wed Jun 30 06:15:48 UTC 2010


Author: petdance
Date: Wed Jun 30 06:15:47 2010
New Revision: 47934
URL: https://trac.parrot.org/parrot/changeset/47934

Log:
consting and annotating

Modified:
   trunk/src/pmc/fixedintegerarray.pmc

Modified: trunk/src/pmc/fixedintegerarray.pmc
==============================================================================
--- trunk/src/pmc/fixedintegerarray.pmc	Wed Jun 30 06:03:16 2010	(r47933)
+++ trunk/src/pmc/fixedintegerarray.pmc	Wed Jun 30 06:15:47 2010	(r47934)
@@ -23,13 +23,20 @@
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
-static int auxcmpfunc(const INTVAL *i, const INTVAL *j);
-#define ASSERT_ARGS_auxcmpfunc __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+PARROT_PURE_FUNCTION
+static int auxcmpfunc(ARGIN(const INTVAL *i), ARGIN(const INTVAL *j))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_auxcmpfunc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(i) \
+    , PARROT_ASSERT_ARG(j))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
+PARROT_PURE_FUNCTION
 static int
-auxcmpfunc(const INTVAL *i, const INTVAL *j)
+auxcmpfunc(ARGIN(const INTVAL *i), ARGIN(const INTVAL *j))
 {
     ASSERT_ARGS(auxcmpfunc)
     return *i - *j;
@@ -545,8 +552,8 @@
             return 0;
 
         for (j = 0; j < n; ++j) {
-            INTVAL item1 = SELF.get_integer_keyed_int(j);
-            INTVAL item2 = VTABLE_get_integer_keyed_int(INTERP, value, j);
+            const INTVAL item1 = SELF.get_integer_keyed_int(j);
+            const INTVAL item2 = VTABLE_get_integer_keyed_int(INTERP, value, j);
 
             if (item1 != item2)
                 return 0;


More information about the parrot-commits mailing list