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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Jun 10 16:51:30 UTC 2010


Author: NotFound
Date: Thu Jun 10 16:51:29 2010
New Revision: 47539
URL: https://trac.parrot.org/parrot/changeset/47539

Log:
explicitly return SELF and some cleaning in FIA sort method

Modified:
   trunk/src/pmc/fixedintegerarray.pmc

Modified: trunk/src/pmc/fixedintegerarray.pmc
==============================================================================
--- trunk/src/pmc/fixedintegerarray.pmc	Thu Jun 10 16:36:44 2010	(r47538)
+++ trunk/src/pmc/fixedintegerarray.pmc	Thu Jun 10 16:51:29 2010	(r47539)
@@ -505,15 +505,14 @@
     }
 
     METHOD sort(PMC *cmp_func :optional) {
-        INTVAL *int_array;
         UINTVAL n;
         INTVAL  size;
 
         GET_ATTR_size(INTERP, SELF, size);
-
         n = (UINTVAL)size;
 
         if (n > 1) {
+            INTVAL *int_array;
             GET_ATTR_int_array(INTERP, SELF, int_array);
             if (PMC_IS_NULL(cmp_func))
                 qsort(int_array, n, sizeof(INTVAL),
@@ -521,6 +520,7 @@
             else
                 Parrot_quicksort(INTERP, (void**)int_array, n, cmp_func);
         }
+        RETURN(PMC *SELF);
     }
 
 /*


More information about the parrot-commits mailing list