Skip to content

Commit

Permalink
Apply patch from bacek++ to get us using documented Parrot API functi…
Browse files Browse the repository at this point in the history
…ons in place of some non-API ones.
  • Loading branch information
jnthn committed Oct 11, 2009
1 parent 1305255 commit d749d9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/pmc/p6opaque.pmc
Expand Up @@ -59,7 +59,7 @@ static PMC *do_handles(PARROT_INTERP, PMC *cur_class, PMC *handlers, STRING *nam
ns = Parrot_get_namespace_keyed(interp, interp->root_namespace, ns_key);
p6meta = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "$!P6META"));
meth = VTABLE_find_method(interp, p6meta, get_pc);
can_check = (PMC *) Parrot_run_meth_fromc_args(interp, meth, p6meta, get_pc,
can_check = (PMC *) Parrot_call_method(interp, meth, p6meta, get_pc,
"PP", matcher);
}
else if (VTABLE_isa(interp, matcher, P6role)) {
Expand All @@ -70,7 +70,7 @@ static PMC *do_handles(PARROT_INTERP, PMC *cur_class, PMC *handlers, STRING *nam
/* Need to select the parameterless role variant. */
STRING * const select = CONST_STRING(interp, "!select");
PMC * const select_meth = VTABLE_find_method(interp, matcher, select);
can_check = (PMC *) Parrot_run_meth_fromc_args(interp, select_meth, matcher,
can_check = (PMC *) Parrot_call_method(interp, select_meth, matcher,
select, "P");
}

Expand All @@ -86,7 +86,7 @@ static PMC *do_handles(PARROT_INTERP, PMC *cur_class, PMC *handlers, STRING *nam
/* Use what we were given as something to smart-match against. */
STRING * const ACCEPTS = CONST_STRING(interp, "ACCEPTS");
PMC * const accepts_meth = VTABLE_find_method(interp, matcher, ACCEPTS);
PMC * const result = (PMC *) Parrot_run_meth_fromc_args(interp,
PMC * const result = (PMC *) Parrot_call_method(interp,
accepts_meth, matcher, ACCEPTS, "PS", name);
if (VTABLE_get_bool(interp, result)) {
attr = VTABLE_get_string_keyed_str(interp, handles_hash, attrname);
Expand Down
12 changes: 6 additions & 6 deletions src/pmc/perl6multisub.pmc
Expand Up @@ -283,7 +283,7 @@ static INTVAL is_narrower(PARROT_INTERP, candidate_info *a, candidate_info *b) {
}
else {
PMC * const accepts_meth_a = VTABLE_find_method(interp, type_obj_b, ACCEPTS);
PMC * const result_n = (PMC *) Parrot_run_meth_fromc_args(interp, accepts_meth_a,
PMC * const result_n = (PMC *) Parrot_call_method(interp, accepts_meth_a,
type_obj_b, ACCEPTS, "PP", type_obj_a);
if (VTABLE_get_integer(interp, result_n)) {
/* Narrower - note it and we're done. */
Expand All @@ -292,7 +292,7 @@ static INTVAL is_narrower(PARROT_INTERP, candidate_info *a, candidate_info *b) {
else {
/* Make sure it's tied, rather than the other way around. */
PMC * const accepts_meth_b = VTABLE_find_method(interp, type_obj_a, ACCEPTS);
PMC * const result_w = (PMC *) Parrot_run_meth_fromc_args(interp,
PMC * const result_w = (PMC *) Parrot_call_method(interp,
accepts_meth_b, type_obj_a,
ACCEPTS, "PP", type_obj_b);
if (!VTABLE_get_integer(interp, result_w)) {
Expand Down Expand Up @@ -567,7 +567,7 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_info **candidates, P
pure_type_result = 0;

/* Run the bindability check. */
bind_check_result = Parrot_runops_fromc_args(interp, checker, "PPPP",
bind_check_result = (PMC*)Parrot_call_sub(interp, checker, "PPPP",
possibles[i]->sub, pos_args, named_args);

/* If we haven't got a possibles storage space, allocate it now. */
Expand Down Expand Up @@ -625,7 +625,7 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_info **candidates, P
PMC * const param = VTABLE_get_pmc_keyed_int(interp, pos_args, i);
PMC * const type_obj = (*cur_candidate)->types[i];
PMC * const accepts_meth = VTABLE_find_method(interp, type_obj, ACCEPTS);
PMC * const result = (PMC *)Parrot_run_meth_fromc_args(interp,
PMC * const result = (PMC *)Parrot_call_method(interp,
accepts_meth, type_obj, ACCEPTS,
"PP", param);

Expand Down Expand Up @@ -728,10 +728,10 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_info **candidates, P

for (i = 0; i < possibles_count; i++) {
PMC * const sig_meth = VTABLE_find_method(interp, possibles[i]->sub, sig_name);
PMC * const sig_obj = (PMC *)Parrot_run_meth_fromc_args(interp, sig_meth,
PMC * const sig_obj = (PMC *)Parrot_call_method(interp, sig_meth,
possibles[i]->sub, sig_name, "P");
PMC * const perl_meth = VTABLE_find_method(interp, sig_obj, perl_name);
STRING * const sig_perl = (STRING *)Parrot_run_meth_fromc_args(interp, perl_meth,
STRING * const sig_perl = (STRING *)Parrot_call_method(interp, perl_meth,
sig_obj, perl_name, "S");
signatures = Parrot_str_append(interp, signatures, sig_perl);
signatures = Parrot_str_append(interp, signatures, newline);
Expand Down

0 comments on commit d749d9b

Please sign in to comment.