Ticket #218: TT_218.patch
File TT_218.patch, 0.8 KB (added by NotFound, 12 years ago) |
---|
-
src/pmc/fixedpmcarray.pmc
44 44 METHOD sort(PMC *cmp_func :optional) { 45 45 const INTVAL n = SELF.elements(); 46 46 47 if (n > 1) 48 Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func); 47 if (n > 1) { 48 if (PObj_is_object_TEST(SELF)) { 49 PMC *parent = SELF.get_attr_str(CONST_STRING(interp, "proxy")); 50 Parrot_pcc_invoke_method_from_c_args(interp, parent, CONST_STRING(interp, "sort"), "P->", cmp_func); 51 } 52 else 53 Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func); 54 } 49 55 } 50 56 51 57 /*