Ticket #218 (assigned bug) — at Version 7
can't sort a PIR subclass of an RPA.
Reported by: | coke | Owned by: | whiteknight |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | |
Severity: | high | Keywords: | tcl blocker |
Cc: | Language: | ||
Patch status: | Platform: | all |
Description (last modified by bacek) (diff)
This patch solves the ticket. But I'm not sure how "kosher" is it.
diff --git a/src/pmc/fixedpmcarray.pmc b/src/pmc/fixedpmcarray.pmc index 6eb6e9f..4146ca4 100644 --- a/src/pmc/fixedpmcarray.pmc +++ b/src/pmc/fixedpmcarray.pmc @@ -47,7 +47,7 @@ Sort this array, optionally using the provided cmp_func const INTVAL n = SELF.elements(); if (n > 1) - Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func); + Parrot_quicksort(interp, (void **)SELF.get_pointer(), n, cmp_func); } /* @@ -144,6 +144,19 @@ fixed sized array). /* +=item C<void *get_pointer()> + +Get pointer to stored data. Used in sort method. + +=cut + +*/ + + VTABLE void * get_pointer() { + return PMC_array(SELF); + } +/* + =item C<INTVAL get_integer()> Returns the number of elements in the array.
Change History
Note: See
TracTickets for help on using
tickets.