[svn:parrot] r38217 - trunk/src/pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Mon Apr 20 01:30:48 UTC 2009
Author: whiteknight
Date: Mon Apr 20 01:30:47 2009
New Revision: 38217
URL: https://trac.parrot.org/parrot/changeset/38217
Log:
switch an instance of PMC_size(), which is specific to the FixedPMCArray PMC, to a call to VTABLE_elements instead. This way the sort method can be better inherited by subclasses (although it still doesn't work, but now it fails for a different reason. See TT #218 for details and progress
Modified:
trunk/src/pmc/fixedpmcarray.pmc
Modified: trunk/src/pmc/fixedpmcarray.pmc
==============================================================================
--- trunk/src/pmc/fixedpmcarray.pmc Mon Apr 20 01:03:48 2009 (r38216)
+++ trunk/src/pmc/fixedpmcarray.pmc Mon Apr 20 01:30:47 2009 (r38217)
@@ -44,7 +44,7 @@
*/
METHOD sort(PMC *cmp_func :optional) {
- const UINTVAL n = (UINTVAL) PMC_size(SELF);
+ const INTVAL n = SELF.elements();
if (n > 1)
Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func);
More information about the parrot-commits
mailing list