Skip to content

Commit

Permalink
explicitly return SELF and some cleaning in FIA sort method
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@47539 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
NotFound committed Jun 10, 2010
1 parent 4584f16 commit 50a20f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pmc/fixedintegerarray.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -505,22 +505,22 @@ Sets the string value of the element at index C<key> to C<value>.
}

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),
(int (*)(const void *, const void*))auxcmpfunc);
else
Parrot_quicksort(INTERP, (void**)int_array, n, cmp_func);
}
RETURN(PMC *SELF);
}

/*
Expand Down

0 comments on commit 50a20f7

Please sign in to comment.