Skip to content
Browse files

explicitly return SELF and some cleaning in FIA sort method

git-svn-id: https://svn.parrot.org/parrot/trunk@47539 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 4584f16 commit 50a20f7729bfc94bcc5dca8121d386016ec1529e @NotFound NotFound committed Jun 10, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/pmc/fixedintegerarray.pmc
View
4 src/pmc/fixedintegerarray.pmc
@@ -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);
}
/*

0 comments on commit 50a20f7

Please sign in to comment.
Something went wrong with that request. Please try again.