Navigation Menu

Skip to content

Commit

Permalink
Avoid using a null PMC in param describing data structure, and use an…
Browse files Browse the repository at this point in the history
… undef instead; it only invites null PMC exceptions (as in RT#63570).
  • Loading branch information
jnthn committed Mar 13, 2009
1 parent e8a8fb6 commit 519b873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/classes/Signature.pir
Expand Up @@ -110,7 +110,7 @@ the Signature.
constraints = 'all'(constraints)
goto set_constraints
no_constraints:
constraints = null
constraints = new 'Failure'
set_constraints:
attr["cons_type"] = constraints
Expand Down
4 changes: 3 additions & 1 deletion src/pmc/perl6multisub.pmc
Expand Up @@ -340,7 +340,9 @@ static candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates, PMC **pr
PMC * const multi_inv = VTABLE_get_pmc_keyed_str(interp, param,
CONST_STRING(interp, "multi_invocant"));
info->types[j] = type;
info->constraints[j] = constraints;
info->constraints[j] = PMC_IS_NULL(constraints) || VTABLE_isa(interp,
constraints, CONST_STRING(interp, "Failure")) ?
PMCNULL : constraints;
if (!PMC_IS_NULL(multi_inv) && VTABLE_get_bool(interp, multi_inv))
info->num_types++;
}
Expand Down

0 comments on commit 519b873

Please sign in to comment.