Skip to content

Commit

Permalink
Get Perl6MultiSub to stringify sensibly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 30, 2009
1 parent 466baf6 commit 2827e45
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pmc/perl6multisub.pmc
Expand Up @@ -1194,6 +1194,24 @@ Makes a copy of this Perl6MultiSub PMC.

/*

=item VTABLE STRING * get_string()

Get an iterator over the candidates.

=cut

*/
VTABLE STRING * get_string() {
PMC *candidates;
GETATTR_Perl6MultiSub_candidates(interp, SELF, candidates);
if (VTABLE_elements(interp, candidates) > 0)
return VTABLE_get_string(interp, VTABLE_get_pmc_keyed_int(interp, candidates, 0));
else
return CONST_STRING(interp, "<anon>");
}

/*

=item METHOD void push(candidate)

Adds a candidate.
Expand Down

0 comments on commit 2827e45

Please sign in to comment.