# New Ticket Created by Andrew Whitworth # Please include the string: [perl #58088] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58088 >
According to http://www.perlfoundation.org/parrot/index.cgi?pdd27mmd_tasklist the function src/multidispatch.c:Parrot_mmd_sort_candidate_list should be renamed to Parrot_mmd_sort_manhattan. This patch does exactly that, renaming all instances of the first to the second. This includes source code files, header files, and the PDD27 itself. --Andrew Whitworth
Index: src/multidispatch.c =================================================================== --- src/multidispatch.c (revision 30314) +++ src/multidispatch.c (working copy) @@ -1100,7 +1100,7 @@ /* -=item C<PMC * Parrot_mmd_sort_candidate_list> +=item C<PMC * Parrot_mmd_sort_manhattan> Given an array PMC (usually a MultiSub) sort the mmd candidates by their manhatten distance to the current args. @@ -1113,7 +1113,7 @@ PARROT_CAN_RETURN_NULL PARROT_WARN_UNUSED_RESULT PMC * -Parrot_mmd_sort_candidate_list(PARROT_INTERP, ARGIN(PMC *candidates)) +Parrot_mmd_sort_manhattan(PARROT_INTERP, ARGIN(PMC *candidates)) { PMC *arg_tuple; INTVAL n = VTABLE_elements(interp, candidates); Index: src/pmc/multisub.pmc =================================================================== --- src/pmc/multisub.pmc (revision 30314) +++ src/pmc/multisub.pmc (working copy) @@ -60,7 +60,7 @@ } VTABLE opcode_t *invoke(void *next) { - PMC * const list = Parrot_mmd_sort_candidate_list(interp, SELF); + PMC * const list = Parrot_mmd_sort_manhattan(interp, SELF); PMC *func; if (PMC_IS_NULL(list)) Index: docs/pdds/pdd27_multiple_dispatch.pod =================================================================== --- docs/pdds/pdd27_multiple_dispatch.pod (revision 30314) +++ docs/pdds/pdd27_multiple_dispatch.pod (working copy) @@ -93,7 +93,7 @@ =item invoke Invoke the best matching candidate for the current call arguments. This vtable -function calls C<Parrot_mmd_sort_candidate_list> from the public MMD API, but +function calls C<Parrot_mmd_sort_manhattan> from the public MMD API, but may be changed to call C<Parrot_mmd_invoke>. =item set_integer_keyed_int, set_number_keyed_int, set_string_keyed_int @@ -140,7 +140,7 @@ =over 4 -=item Parrot_mmd_sort_candidate_list +=item Parrot_mmd_sort_manhattan Performs a multiple dispatch lookup on an array of subroutines. The call signature to match is pulled from the current interpreter, following the Index: include/parrot/multidispatch.h =================================================================== --- include/parrot/multidispatch.h (revision 30314) +++ include/parrot/multidispatch.h (working copy) @@ -214,7 +214,7 @@ PARROT_API PARROT_CAN_RETURN_NULL PARROT_WARN_UNUSED_RESULT -PMC * Parrot_mmd_sort_candidate_list(PARROT_INTERP, ARGIN(PMC *candidates)) +PMC * Parrot_mmd_sort_manhattan(PARROT_INTERP, ARGIN(PMC *candidates)) __attribute__nonnull__(1) __attribute__nonnull__(2);