Skip to content

Commit

Permalink
ran allison++'s script against the src/ files
Browse files Browse the repository at this point in the history
Things now work again with Parrot r36319 and later.
  • Loading branch information
Carl Masak committed Feb 3, 2009
1 parent 21f374f commit 8e67a4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/ops/perl6.ops
Expand Up @@ -14,7 +14,7 @@ inline op rebless_subclass(in PMC, in PMC) :base_core {
* to re-bless it into. While we're at it, count the number of attributes
* the current class has that the parent class does not. */
PMC *current_class = VTABLE_get_class(interp, $1);
PMC *parent_list = VTABLE_inspect_str(interp, $2, const_string(interp, "all_parents"));
PMC *parent_list = VTABLE_inspect_str(interp, $2, Parrot_str_new_constant(interp, "all_parents"));
int num_parents = VTABLE_elements(interp, parent_list);
int in_parents = 0;
int new_attribs = 0;
Expand All @@ -27,7 +27,7 @@ inline op rebless_subclass(in PMC, in PMC) :base_core {
}
else {
new_attribs += VTABLE_elements(interp, VTABLE_inspect_str(interp,
test_class, const_string(interp, "attributes")));
test_class, Parrot_str_new_constant(interp, "attributes")));
}
}
if (!in_parents)
Expand All @@ -36,7 +36,7 @@ inline op rebless_subclass(in PMC, in PMC) :base_core {

/* Make sure we're operating on the real value, not a ObjectRef. */
value = $1;
while (VTABLE_isa(interp, value, const_string(interp, "ObjectRef")))
while (VTABLE_isa(interp, value, Parrot_str_new_constant(interp, "ObjectRef")))
value = VTABLE_get_pmc(interp, value);

/* Check what we're trying to bless into is a standard Parrot class. */
Expand Down
6 changes: 3 additions & 3 deletions src/pmc/perl6multisub.pmc
Expand Up @@ -662,16 +662,16 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_info **candidates, P
STRING *sig_name = CONST_STRING(interp, "signature");
STRING *perl_name = CONST_STRING(interp, "perl");
STRING *newline = CONST_STRING(interp, "\n");
STRING *signatures = string_from_cstring(interp, "", 0);
STRING *signatures = Parrot_str_new(interp, "", 0);
for (i = 0; i < possibles_count; i++) {
PMC *sig_meth = VTABLE_find_method(interp, possibles[i]->sub, sig_name);
PMC *sig_obj = (PMC *)Parrot_run_meth_fromc_args(interp, sig_meth,
possibles[i]->sub, sig_name, "P");
PMC *perl_meth = VTABLE_find_method(interp, sig_obj, perl_name);
STRING *sig_perl = (STRING *)Parrot_run_meth_fromc_args(interp, perl_meth,
sig_obj, perl_name, "S");
signatures = string_append(interp, signatures, sig_perl);
signatures = string_append(interp, signatures, newline);
signatures = Parrot_str_append(interp, signatures, sig_perl);
signatures = Parrot_str_append(interp, signatures, newline);
}
Parrot_ex_throw_from_c_args(interp, next, 1,
"Ambiguous dispatch to multi '%Ss'. Ambiguous candidates had signatures:\n%Ss",
Expand Down
10 changes: 5 additions & 5 deletions src/pmc/perl6str.pmc
Expand Up @@ -272,7 +272,7 @@ C<isdigit()> respectively.
VTABLE void increment() {
STRING *str = Parrot_unCOW_string(interp, PMC_str_val(SELF));
char *start = str->strstart;
const char * const end = start + string_length(INTERP, str);
const char * const end = start + Parrot_str_byte_length(INTERP, str);

/* pointer to the substring we're going to increment */
char *substr;
Expand Down Expand Up @@ -352,22 +352,22 @@ C<isdigit()> respectively.
/* length to end of string */
INTVAL b = str->strlen - a;

STRING *rep = string_substr(INTERP, str, a, b, NULL, 0);
STRING *rep = Parrot_str_substr(INTERP, str, a, b, NULL, 0);
INTVAL c = '1';

if (isalpha((unsigned char)start[a]))
c = start[a];

string_replace(INTERP, str, a + 1, b, rep, 0);
string_replace(INTERP, str, a, 1, string_chr(INTERP, c), 0);
Parrot_str_replace(INTERP, str, a + 1, b, rep, 0);
Parrot_str_replace(INTERP, str, a, 1, string_chr(INTERP, c), 0);
}
}


VTABLE void decrement() {
STRING *str = Parrot_unCOW_string(interp, PMC_str_val(SELF));
char *start = str->strstart;
char * const end = start + string_length(INTERP, str);
char * const end = start + Parrot_str_byte_length(INTERP, str);

/* pointer to the substring we're going to decrement */
char *substr;
Expand Down

0 comments on commit 8e67a4f

Please sign in to comment.