Created
February 3, 2009 16:23
-
-
Save masak/57593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git di | |
diff --git a/src/ops/perl6.ops b/src/ops/perl6.ops | |
index 092e1d2..5aab92c 100644 | |
--- a/src/ops/perl6.ops | |
+++ b/src/ops/perl6.ops | |
@@ -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 | |
+ PMC *parent_list = VTABLE_inspect_str(interp, $2, Parrot_str_new_constant(i | |
int num_parents = VTABLE_elements(interp, parent_list); | |
int in_parents = 0; | |
int new_attribs = 0; | |
@@ -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) | |
@@ -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. */ | |
diff --git a/src/pmc/perl6multisub.pmc b/src/pmc/perl6multisub.pmc | |
index ab0f3f2..ca5b6aa 100644 | |
--- a/src/pmc/perl6multisub.pmc | |
+++ b/src/pmc/perl6multisub.pmc | |
@@ -662,7 +662,7 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_ | |
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]->su | |
PMC *sig_obj = (PMC *)Parrot_run_meth_fromc_args(interp, s | |
@@ -670,8 +670,8 @@ static PMC* do_dispatch(PARROT_INTERP, PMC *self, candidate_ | |
PMC *perl_meth = VTABLE_find_method(interp, sig_obj, perl_na | |
STRING *sig_perl = (STRING *)Parrot_run_meth_fromc_args(interp | |
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 si | |
diff --git a/src/pmc/perl6str.pmc b/src/pmc/perl6str.pmc | |
index e197223..b14b900 100644 | |
--- a/src/pmc/perl6str.pmc | |
+++ b/src/pmc/perl6str.pmc | |
@@ -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; | |
@@ -352,14 +352,14 @@ 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); | |
} | |
} | |
@@ -367,7 +367,7 @@ C<isdigit()> respectively. | |
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment