[svn:parrot] r36257 - in branches/pdd28str_part2: include/parrot languages/lua/src/pmc languages/pipp/src/pmc src src/jit/i386 src/jit/ppc src/ops src/pmc src/string src/string/charset src/string/encoding
allison at svn.parrot.org
allison at svn.parrot.org
Sun Feb 1 20:43:03 UTC 2009
Author: allison
Date: Sun Feb 1 20:43:00 2009
New Revision: 36257
URL: https://trac.parrot.org/parrot/changeset/36257
Log:
[pdd28str] Renaming 'string_copy' to 'Parrot_str_copy'.
Modified:
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/languages/lua/src/pmc/luafunction.pmc
branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc
branches/pdd28str_part2/languages/pipp/src/pmc/phparray.pmc
branches/pdd28str_part2/src/hash.c
branches/pdd28str_part2/src/jit/i386/core.jit
branches/pdd28str_part2/src/jit/ppc/core.jit
branches/pdd28str_part2/src/jit_debug.c
branches/pdd28str_part2/src/jit_debug_xcoff.c
branches/pdd28str_part2/src/library.c
branches/pdd28str_part2/src/list.c
branches/pdd28str_part2/src/ops/set.ops
branches/pdd28str_part2/src/ops/string.ops
branches/pdd28str_part2/src/pmc/class.pmc
branches/pdd28str_part2/src/pmc/codestring.pmc
branches/pdd28str_part2/src/pmc/coroutine.pmc
branches/pdd28str_part2/src/pmc/eventhandler.pmc
branches/pdd28str_part2/src/pmc/filehandle.pmc
branches/pdd28str_part2/src/pmc/key.pmc
branches/pdd28str_part2/src/pmc/parrotinterpreter.pmc
branches/pdd28str_part2/src/pmc/pmcproxy.pmc
branches/pdd28str_part2/src/pmc/role.pmc
branches/pdd28str_part2/src/pmc/string.pmc
branches/pdd28str_part2/src/pmc/stringhandle.pmc
branches/pdd28str_part2/src/pmc/sub.pmc
branches/pdd28str_part2/src/spf_vtable.c
branches/pdd28str_part2/src/string/api.c
branches/pdd28str_part2/src/string/charset/ascii.c
branches/pdd28str_part2/src/string/charset/iso-8859-1.c
branches/pdd28str_part2/src/string/encoding/utf16.c
branches/pdd28str_part2/src/string/encoding/utf8.c
Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Sun Feb 1 20:43:00 2009 (r36257)
@@ -232,7 +232,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
-STRING * string_copy(PARROT_INTERP, ARGMOD(STRING *s))
+STRING * Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*s);
@@ -618,7 +618,7 @@
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_Parrot_str_concat __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_string_cstring_free __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
Modified: branches/pdd28str_part2/languages/lua/src/pmc/luafunction.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luafunction.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luafunction.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -153,7 +153,7 @@
*/
METHOD STRING *get_name() {
const Parrot_sub * const sub = PMC_sub(SELF);
- STRING *retval = string_copy(INTERP, sub->name);
+ STRING *retval = Parrot_str_copy(INTERP, sub->name);
RETURN(STRING *retval);
}
Modified: branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -65,7 +65,7 @@
else
res = pmc_new(INTERP, type);
- VTABLE_set_string_native(INTERP, res, string_copy(INTERP, rep));
+ VTABLE_set_string_native(INTERP, res, Parrot_str_copy(INTERP, rep));
PObj_custom_mark_SET(res);
return res;
}
Modified: branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luatable.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -570,7 +570,7 @@
*/
VTABLE void set_pmc_keyed_str(STRING *key, PMC *value) {
PMC * pmc_key = pmc_new(INTERP, dynpmc_LuaString);
- VTABLE_set_string_native(INTERP, pmc_key, string_copy(INTERP, key));
+ VTABLE_set_string_native(INTERP, pmc_key, Parrot_str_copy(INTERP, key));
value = VTABLE_clone(interp, value);
*lua_set(INTERP, PMC_hash(SELF), pmc_key) = value;
}
Modified: branches/pdd28str_part2/languages/pipp/src/pmc/phparray.pmc
==============================================================================
--- branches/pdd28str_part2/languages/pipp/src/pmc/phparray.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/languages/pipp/src/pmc/phparray.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -1483,7 +1483,7 @@
pipp_hash_create(INTERP, orig_ht->capacity);
for (bkt = orig_ht->tableHead; bkt != NULL; bkt = bkt->tableNext) {
- cloned_key = string_copy(INTERP, bkt->key);
+ cloned_key = Parrot_str_copy(INTERP, bkt->key);
cloned_value = VTABLE_clone(INTERP, bkt->value);
pipp_hash_put(INTERP, cloned_ht, cloned_key, cloned_value);
}
@@ -1519,7 +1519,7 @@
pipp_hash_resize(INTERP, my_ht, src_ht->elementCount);
for (bkt = src_ht->tableHead; bkt != NULL; bkt = bkt->tableNext) {
- STRING *key_copy = string_copy(INTERP, bkt->key);
+ STRING *key_copy = Parrot_str_copy(INTERP, bkt->key);
PMC *value_copy = VTABLE_clone(INTERP, bkt->value);
pipp_hash_put(INTERP, my_ht, key_copy, value_copy);
}
@@ -1589,7 +1589,7 @@
GET_ATTR_hash_table(INTERP, src, src_ht);
for (bkt = src_ht->tableHead; bkt != NULL; bkt = bkt->tableNext) {
- key_copy = string_copy(INTERP, bkt->key);
+ key_copy = Parrot_str_copy(INTERP, bkt->key);
value_copy = VTABLE_clone(INTERP, bkt->value);
/* TODO: This isn't especially efficient. */
if (!pipp_hash_find(INTERP, my_ht, key_copy))
@@ -1972,7 +1972,7 @@
GET_ATTR_hash_table(INTERP, SELF, ht);
if (ht->internalPointer)
- s_key = string_copy(INTERP, ht->internalPointer->key);
+ s_key = Parrot_str_copy(INTERP, ht->internalPointer->key);
else
s_key = CONST_STRING(INTERP, "");
Modified: branches/pdd28str_part2/src/hash.c
==============================================================================
--- branches/pdd28str_part2/src/hash.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/hash.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -1447,7 +1447,7 @@
break;
case enum_type_STRING:
- valtmp = (void *)string_copy(interp, (STRING *)b->value);
+ valtmp = (void *)Parrot_str_copy(interp, (STRING *)b->value);
break;
case enum_type_PMC:
Modified: branches/pdd28str_part2/src/jit/i386/core.jit
==============================================================================
--- branches/pdd28str_part2/src/jit/i386/core.jit Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/jit/i386/core.jit Sun Feb 1 20:43:00 2009 (r36257)
@@ -1114,7 +1114,7 @@
Parrot_jit_emit_get_INTERP(interp, jit_info->native_ptr, emit_ECX);
emitm_pushl_i(NATIVECODE, CONST(2)->u.string);
emitm_pushl_r(NATIVECODE, emit_ECX);
- CALL_FUNCTION(jit_info, string_copy);
+ CALL_FUNCTION(jit_info, Parrot_str_copy);
emitm_addb_i_r(NATIVECODE, 8, emit_ESP);
jit_emit_mov_MR_i(interp, NATIVECODE, ROFFS_STR(1), emit_EAX );
}
Modified: branches/pdd28str_part2/src/jit/ppc/core.jit
==============================================================================
--- branches/pdd28str_part2/src/jit/ppc/core.jit Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/jit/ppc/core.jit Sun Feb 1 20:43:00 2009 (r36257)
@@ -1182,11 +1182,11 @@
}
TEMPLATE Parrot_set_or_clone_s_sc {
-; string_copy(Interp *interp, STRING *s)
+; Parrot_str_copy(Interp *interp, STRING *s)
jit_emit_mov_rr(NATIVECODE, r3, r16);
jit_emit_mov_ri_i(NATIVECODE, r4, CONST(2)->u.string);
- jit_emit_call_func(NATIVECODE, (void*) string_copy);
+ jit_emit_call_func(NATIVECODE, (void*) Parrot_str_copy);
jit_emit_mov_mr_i(NATIVECODE, ROFFS_STR(1), r3);
}
@@ -1208,7 +1208,7 @@
jit_emit_mov_rr(NATIVECODE, r3, r16);
jit_emit_mov_rm_i(NATIVECODE, r4, ROFFS_STR(2));
- jit_emit_call_func(NATIVECODE, (void*) string_copy);
+ jit_emit_call_func(NATIVECODE, (void*) Parrot_str_copy);
jit_emit_mov_mr_i(NATIVECODE,ROFFS_STR(1), r3);
}
Modified: branches/pdd28str_part2/src/jit_debug.c
==============================================================================
--- branches/pdd28str_part2/src/jit_debug.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/jit_debug.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -251,7 +251,7 @@
debug_file(PARROT_INTERP, STRING *file, const char *ext)
{
STRING *ret;
- ret = string_copy(interp, file);
+ ret = Parrot_str_copy(interp, file);
ret = Parrot_str_append(interp, ret,
string_make(interp, ext, strlen(ext), NULL,
PObj_external_FLAG));
@@ -288,7 +288,7 @@
interp->code->debugs, 0));
pasmfile = string_make(interp, src, strlen(src), NULL,
PObj_external_FLAG);
- file = string_copy(interp, pasmfile);
+ file = Parrot_str_copy(interp, pasmfile);
/* chop pasm/pir */
ext = strrchr(src, '.');
Modified: branches/pdd28str_part2/src/jit_debug_xcoff.c
==============================================================================
--- branches/pdd28str_part2/src/jit_debug_xcoff.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/jit_debug_xcoff.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -223,7 +223,7 @@
debug_file(PARROT_INTERP, STRING *file, const char *ext)
{
STRING *ret;
- ret = string_copy(interp, file);
+ ret = Parrot_str_copy(interp, file);
ret = Parrot_str_append(interp, ret,
string_make(interp, ext, strlen(ext), NULL,
PObj_external_FLAG));
@@ -259,7 +259,7 @@
interp->code->debugs, 0));
pasmfile = string_make(interp, src, strlen(src), NULL,
PObj_external_FLAG);
- file = string_copy(interp, pasmfile);
+ file = Parrot_str_copy(interp, pasmfile);
/* chop pasm/pir */
ext = strrchr(src, '.');
Modified: branches/pdd28str_part2/src/library.c
==============================================================================
--- branches/pdd28str_part2/src/library.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/library.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -450,7 +450,7 @@
ASSERT_ARGS(path_concat)
STRING* join;
- join = string_copy(interp, l_path);
+ join = Parrot_str_copy(interp, l_path);
join = path_guarantee_trailing_separator(interp, join);
join = Parrot_str_append(interp, join, r_path);
@@ -477,7 +477,7 @@
ASSERT_ARGS(try_load_path)
STRING *final;
- final = string_copy(interp, path);
+ final = Parrot_str_copy(interp, path);
final = path_finalize(interp, final);
@@ -512,7 +512,7 @@
STRING * const pasm_extension = CONST_STRING(interp, ".pasm");
int guess;
- test_path = string_copy(interp, path);
+ test_path = Parrot_str_copy(interp, path);
/* First try the path as given. */
result = try_load_path(interp, test_path);
@@ -652,7 +652,7 @@
if (Parrot_str_byte_length(interp, prefix) && !is_abs_path(path))
full_name = path_concat(interp, prefix, path);
else
- full_name = string_copy(interp, path);
+ full_name = Parrot_str_copy(interp, path);
full_name = path_append(interp, full_name, file);
@@ -835,11 +835,11 @@
}
else if (pos_sl) {
stem = string_substr(interp, in, pos_sl, len - pos_sl, NULL, 0);
- *wo_ext = string_copy(interp, in);
+ *wo_ext = Parrot_str_copy(interp, in);
*ext = NULL;
}
else {
- stem = string_copy(interp, in);
+ stem = Parrot_str_copy(interp, in);
*wo_ext = stem;
*ext = NULL;
}
Modified: branches/pdd28str_part2/src/list.c
==============================================================================
--- branches/pdd28str_part2/src/list.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/list.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -1497,7 +1497,7 @@
s = ((STRING **) PObj_bufstart(&chunk->data))[i];
if (s) {
((STRING **) PObj_bufstart(&new_chunk->data))[i] =
- string_copy(interp, s);
+ Parrot_str_copy(interp, s);
}
}
break;
Modified: branches/pdd28str_part2/src/ops/set.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/set.ops Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/ops/set.ops Sun Feb 1 20:43:00 2009 (r36257)
@@ -27,7 +27,7 @@
=cut
inline op clone(out STR, in STR) :base_mem {
- $1 = string_copy(interp, $2);
+ $1 = Parrot_str_copy(interp, $2);
}
@@ -153,7 +153,7 @@
}
inline op set(out STR, inconst STR) :base_core {
- $1 = string_copy(interp, $2);
+ $1 = Parrot_str_copy(interp, $2);
}
inline op set(out STR, in INT) :base_core {
@@ -186,7 +186,7 @@
inline op set(invar PMC, inconst STR) :base_core {
VTABLE_set_string_native(interp, $1,
- string_copy(interp, $2));
+ Parrot_str_copy(interp, $2));
}
inline op set(out INT, invar PMC) :base_core {
$1 = VTABLE_get_integer(interp, $2);
Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/ops/string.ops Sun Feb 1 20:43:00 2009 (r36257)
@@ -521,7 +521,7 @@
op charsetname(out STR, in INT) :base_core {
STRING * const name = Parrot_charset_name(interp, $2);
- $1 = name ? string_copy(interp, name) : NULL;
+ $1 = name ? Parrot_str_copy(interp, name) : NULL;
}
op find_charset(out INT, in STR) :base_core {
@@ -577,7 +577,7 @@
op encodingname(out STR, in INT) :base_core {
STRING * const name = Parrot_encoding_name(interp, $2);
- $1 = name ? string_copy(interp, name) : NULL;
+ $1 = name ? Parrot_str_copy(interp, name) : NULL;
}
op find_encoding(out INT, in STR) :base_core {
Modified: branches/pdd28str_part2/src/pmc/class.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/class.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/class.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -579,7 +579,7 @@
*/
VTABLE STRING *get_string() {
- return string_copy(interp, make_class_name(interp, SELF));
+ return Parrot_str_copy(interp, make_class_name(interp, SELF));
}
/*
Modified: branches/pdd28str_part2/src/pmc/codestring.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/codestring.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -149,7 +149,7 @@
RETURN(STRING *counter_as_string);
}
else {
- STRING *result = string_copy(INTERP, format);
+ STRING *result = Parrot_str_copy(INTERP, format);
result = Parrot_str_concat(INTERP, result, counter_as_string, 1);
RETURN(STRING *result);
}
Modified: branches/pdd28str_part2/src/pmc/coroutine.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/coroutine.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/coroutine.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -104,7 +104,7 @@
memcpy(sub, PMC_sub(SELF), sizeof (Parrot_coro));
- sub->name = string_copy(INTERP, sub->name);
+ sub->name = Parrot_str_copy(INTERP, sub->name);
return ret;
}
Modified: branches/pdd28str_part2/src/pmc/eventhandler.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/eventhandler.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/eventhandler.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -194,7 +194,7 @@
PMC_data_typed(SELF, Parrot_EventHandler_attributes *);
if (e)
- return string_copy(INTERP, e->type);
+ return Parrot_str_copy(INTERP, e->type);
return string_from_literal(INTERP, "");
}
Modified: branches/pdd28str_part2/src/pmc/filehandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/filehandle.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/filehandle.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -204,10 +204,10 @@
"Cannot reopen already open filehandle");
if (got_mode && !STRING_IS_NULL(mode))
- SET_ATTR_mode(INTERP, SELF, string_copy(INTERP, mode));
+ SET_ATTR_mode(INTERP, SELF, Parrot_str_copy(INTERP, mode));
if (got_filename && !STRING_IS_NULL(filename))
- SET_ATTR_filename(INTERP, SELF, string_copy(INTERP, filename));
+ SET_ATTR_filename(INTERP, SELF, Parrot_str_copy(INTERP, filename));
/* Open the file. When no options are passed, reopen the same file as
* before */
@@ -607,7 +607,7 @@
STRING *mode, *mode_copy;
GET_ATTR_mode(INTERP, SELF, mode);
- mode_copy = string_copy(INTERP, mode);
+ mode_copy = Parrot_str_copy(INTERP, mode);
RETURN(STRING *mode_copy);
@@ -630,14 +630,14 @@
if (got_encoding) {
if (!STRING_IS_NULL(new_encoding))
- encoding_copy = string_copy(INTERP, new_encoding);
+ encoding_copy = Parrot_str_copy(INTERP, new_encoding);
SET_ATTR_encoding(INTERP, SELF, encoding_copy);
RETURN(STRING *new_encoding);
}
GET_ATTR_encoding(INTERP, SELF, encoding);
if (!STRING_IS_NULL(encoding))
- encoding_copy = string_copy(INTERP, encoding);
+ encoding_copy = Parrot_str_copy(INTERP, encoding);
RETURN(STRING *encoding_copy);
Modified: branches/pdd28str_part2/src/pmc/key.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/key.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/key.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -67,7 +67,7 @@
case KEY_string_FLAG:
case KEY_string_FLAG | KEY_register_FLAG:
key_set_string(INTERP, dkey,
- string_copy(INTERP, VTABLE_get_string(INTERP, key)));
+ Parrot_str_copy(INTERP, VTABLE_get_string(INTERP, key)));
break;
case KEY_pmc_FLAG:
case KEY_pmc_FLAG | KEY_register_FLAG:
Modified: branches/pdd28str_part2/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/parrotinterpreter.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/parrotinterpreter.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -124,7 +124,7 @@
PMC *dest = Parrot_clone(d, source);
Parrot_Class_attributes *source_class = PARROT_CLASS(source);
Parrot_Class_attributes *dest_class = PARROT_CLASS(dest);
- dest_class->name = string_copy(d, source_class->name);
+ dest_class->name = Parrot_str_copy(d, source_class->name);
dest_class->_namespace = VTABLE_clone(d, source_class->_namespace);
}
}
Modified: branches/pdd28str_part2/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/pmcproxy.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/pmcproxy.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -497,7 +497,7 @@
Parrot_Class_attributes * const proxy_info = PARROT_CLASS(SELF);
/* Copy the stored string name of the proxy. */
- return string_copy(interp, proxy_info->name);
+ return Parrot_str_copy(interp, proxy_info->name);
}
Modified: branches/pdd28str_part2/src/pmc/role.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/role.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/role.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -516,7 +516,7 @@
}
/* Otherwise, copy the stored string name of the class. */
- return string_copy(interp, role->name);
+ return Parrot_str_copy(interp, role->name);
}
/*
Modified: branches/pdd28str_part2/src/pmc/string.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/string.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/string.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -89,7 +89,7 @@
VTABLE PMC *clone() {
PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
PObj_custom_mark_SET(dest);
- VTABLE_set_string_native(INTERP, dest, string_copy(INTERP, SELF.get_string()));
+ VTABLE_set_string_native(INTERP, dest, Parrot_str_copy(INTERP, SELF.get_string()));
return dest;
}
@@ -152,7 +152,7 @@
VTABLE STRING *get_string() {
STRING * const s = PMC_str_val(SELF);
- return s ? string_copy(INTERP, s) : NULL;
+ return s ? Parrot_str_copy(INTERP, s) : NULL;
}
/*
Modified: branches/pdd28str_part2/src/pmc/stringhandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/stringhandle.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/stringhandle.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -72,9 +72,9 @@
Parrot_StringHandle_attributes * const data_struct = PARROT_STRINGHANDLE(copy);
data_struct->flags = old_struct->flags;
- data_struct->stringhandle = string_copy(INTERP, old_struct->stringhandle);
- data_struct->mode = string_copy(INTERP, old_struct->mode);
- data_struct->encoding = string_copy(INTERP, old_struct->encoding);
+ data_struct->stringhandle = Parrot_str_copy(INTERP, old_struct->stringhandle);
+ data_struct->mode = Parrot_str_copy(INTERP, old_struct->mode);
+ data_struct->encoding = Parrot_str_copy(INTERP, old_struct->encoding);
return copy;
}
@@ -161,10 +161,10 @@
INTVAL flags;
if (got_mode && !STRING_IS_NULL(mode))
- SET_ATTR_mode(INTERP, SELF, string_copy(INTERP, mode));
+ SET_ATTR_mode(INTERP, SELF, Parrot_str_copy(INTERP, mode));
if (got_filename && !STRING_IS_NULL(filename))
- SET_ATTR_filename(INTERP, SELF, string_copy(INTERP, filename));
+ SET_ATTR_filename(INTERP, SELF, Parrot_str_copy(INTERP, filename));
/* If StringHandle hasn't already been initialized, create a new string. */
@@ -263,7 +263,7 @@
"Cannot read from a closed filehandle");
if (length == 0)
- string_result = string_copy(INTERP, string_orig);
+ string_result = Parrot_str_copy(INTERP, string_orig);
else {
INTVAL orig_length, read_length;
read_length = length;
@@ -345,7 +345,7 @@
string_result = Parrot_str_new_constant(INTERP, "");
}
else
- string_result = string_copy(INTERP, string_result);
+ string_result = Parrot_str_copy(INTERP, string_result);
RETURN(STRING *string_result);
}
@@ -494,7 +494,7 @@
STRING *mode, *mode_copy;
GET_ATTR_mode(INTERP, SELF, mode);
- mode_copy = string_copy(INTERP, mode);
+ mode_copy = Parrot_str_copy(INTERP, mode);
RETURN(STRING *mode_copy);
@@ -517,14 +517,14 @@
if (got_encoding) {
if (!STRING_IS_NULL(new_encoding))
- encoding_copy = string_copy(INTERP, new_encoding);
+ encoding_copy = Parrot_str_copy(INTERP, new_encoding);
SET_ATTR_encoding(INTERP, SELF, encoding_copy);
RETURN(STRING *new_encoding);
}
GET_ATTR_encoding(INTERP, SELF, encoding);
if (!STRING_IS_NULL(encoding))
- encoding_copy = string_copy(INTERP, encoding);
+ encoding_copy = Parrot_str_copy(INTERP, encoding);
RETURN(STRING *encoding_copy);
Modified: branches/pdd28str_part2/src/pmc/sub.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/sub.pmc Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/pmc/sub.pmc Sun Feb 1 20:43:00 2009 (r36257)
@@ -116,12 +116,12 @@
VTABLE STRING *get_string() {
const Parrot_sub * const sub = PMC_sub(SELF);
- return string_copy(INTERP, sub->name);
+ return Parrot_str_copy(INTERP, sub->name);
}
VTABLE void set_string_native(STRING *subname) {
Parrot_sub * const sub = PMC_sub(SELF);
- sub->name = string_copy(INTERP, subname);
+ sub->name = Parrot_str_copy(INTERP, subname);
}
/*
@@ -381,12 +381,12 @@
/* we have to mark it ourselves */
PObj_custom_mark_destroy_SETALL(ret);
- /* first set the sub struct, string_copy may cause GC */
+ /* first set the sub struct, Parrot_str_copy may cause GC */
PMC_struct_val(ret) = sub;
PMC_pmc_val(ret) = NULL;
memcpy(sub, PMC_sub(SELF), sizeof (Parrot_sub));
if (sub->name != NULL)
- sub->name = string_copy(INTERP, sub->name);
+ sub->name = Parrot_str_copy(INTERP, sub->name);
if (sub->ctx)
Parrot_context_ref(INTERP, sub->ctx);
@@ -417,7 +417,7 @@
memcpy(PMC_sub(SELF), PMC_sub(other), sizeof (struct Parrot_sub));
/* copy the name so it's a different string in memory */
- PMC_sub(SELF)->name = string_copy(INTERP, PMC_sub(SELF)->name);
+ PMC_sub(SELF)->name = Parrot_str_copy(INTERP, PMC_sub(SELF)->name);
}
else
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
Modified: branches/pdd28str_part2/src/spf_vtable.c
==============================================================================
--- branches/pdd28str_part2/src/spf_vtable.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/spf_vtable.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -441,7 +441,7 @@
obj->index++;
s = VTABLE_get_string(interp, tmp);
- /* XXX string_copy like below? + adjusting bufused */
+ /* XXX Parrot_str_copy like below? + adjusting bufused */
return string_substr(interp, s, 0, 1, NULL, 0);
}
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/string/api.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -516,11 +516,11 @@
return result;
}
- return string_copy(interp, a);
+ return Parrot_str_copy(interp, a);
}
return b
- ? string_copy(interp, b)
+ ? Parrot_str_copy(interp, b)
: string_make(interp, NULL, 0, NULL, Uflags);
}
@@ -558,7 +558,7 @@
/* Is A real? */
if (a == NULL || PObj_bufstart(a) == NULL)
- return string_copy(interp, b);
+ return Parrot_str_copy(interp, b);
saneify_string(a);
saneify_string(b);
@@ -1007,7 +1007,7 @@
/*
-=item C<STRING * string_copy>
+=item C<STRING * Parrot_str_copy>
Creates and returns a copy of the specified Parrot string.
@@ -1019,9 +1019,9 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
STRING *
-string_copy(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_copy(PARROT_INTERP, ARGMOD(STRING *s))
{
- ASSERT_ARGS(string_copy)
+ ASSERT_ARGS(Parrot_str_copy)
return Parrot_str_new_COW(interp, s);
}
@@ -1402,7 +1402,7 @@
string_chopn(PARROT_INTERP, ARGMOD(STRING *s), INTVAL n)
{
ASSERT_ARGS(string_chopn)
- STRING * const chopped = string_copy(interp, s);
+ STRING * const chopped = Parrot_str_copy(interp, s);
string_chopn_inplace(interp, chopped, n);
return chopped;
}
@@ -2678,7 +2678,7 @@
}
else {
DECL_CONST_CAST;
- STRING * const dest = string_copy(interp, PARROT_const_cast(STRING *, s));
+ STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
string_upcase_inplace(interp, dest);
return dest;
}
@@ -2730,7 +2730,7 @@
{
ASSERT_ARGS(string_downcase)
DECL_CONST_CAST;
- STRING * const dest = string_copy(interp, PARROT_const_cast(STRING *, s));
+ STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
string_downcase_inplace(interp, dest);
return dest;
}
@@ -2753,7 +2753,7 @@
ASSERT_ARGS(string_downcase_inplace)
/*
* TODO get rid of all the inplace variants. We have for utf8:
- * * 1 string_copy from the non-incase variant
+ * * 1 Parrot_str_copy from the non-incase variant
* * conversion to utf16, with doubling the buffer
* * possibly one more reallocation in downcase
*/
@@ -2781,7 +2781,7 @@
{
ASSERT_ARGS(string_titlecase)
DECL_CONST_CAST;
- STRING * const dest = string_copy(interp, PARROT_const_cast(STRING *, s));
+ STRING * const dest = Parrot_str_copy(interp, PARROT_const_cast(STRING *, s));
string_titlecase_inplace(interp, dest);
return dest;
}
@@ -3108,7 +3108,7 @@
return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
s = VTABLE_get_string_keyed_int(interp, ar, 0);
- res = s ? string_copy(interp, s) : NULL;
+ res = s ? Parrot_str_copy(interp, s) : NULL;
for (i = 1; i < ar_len; ++i) {
STRING * const next = VTABLE_get_string_keyed_int(interp, ar, i);
Modified: branches/pdd28str_part2/src/string/charset/ascii.c
==============================================================================
--- branches/pdd28str_part2/src/string/charset/ascii.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/string/charset/ascii.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -358,7 +358,7 @@
compose(PARROT_INTERP, ARGIN(STRING *src))
{
ASSERT_ARGS(compose)
- return string_copy(interp, src);
+ return Parrot_str_copy(interp, src);
}
/* A noop. can't decompose ascii */
@@ -378,7 +378,7 @@
decompose(PARROT_INTERP, ARGMOD(STRING *src))
{
ASSERT_ARGS(decompose)
- return string_copy(interp, src);
+ return Parrot_str_copy(interp, src);
}
/*
Modified: branches/pdd28str_part2/src/string/charset/iso-8859-1.c
==============================================================================
--- branches/pdd28str_part2/src/string/charset/iso-8859-1.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/string/charset/iso-8859-1.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -328,7 +328,7 @@
compose(PARROT_INTERP, ARGIN(STRING *src))
{
ASSERT_ARGS(compose)
- return string_copy(interp, src);
+ return Parrot_str_copy(interp, src);
}
/*
Modified: branches/pdd28str_part2/src/string/encoding/utf16.c
==============================================================================
--- branches/pdd28str_part2/src/string/encoding/utf16.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/string/encoding/utf16.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -255,7 +255,7 @@
if (src->encoding == Parrot_utf16_encoding_ptr ||
src->encoding == Parrot_ucs2_encoding_ptr)
- return in_place ? src : string_copy(interp, src);
+ return in_place ? src : Parrot_str_copy(interp, src);
/*
* TODO adapt string creation functions
*/
Modified: branches/pdd28str_part2/src/string/encoding/utf8.c
==============================================================================
--- branches/pdd28str_part2/src/string/encoding/utf8.c Sun Feb 1 20:34:43 2009 (r36256)
+++ branches/pdd28str_part2/src/string/encoding/utf8.c Sun Feb 1 20:43:00 2009 (r36257)
@@ -570,7 +570,7 @@
unsigned char *new_pos, *pos, *p;
if (src->encoding == Parrot_utf8_encoding_ptr)
- return in_place ? src : string_copy(interp, src);
+ return in_place ? src : Parrot_str_copy(interp, src);
src_len = src->strlen;
if (in_place) {
result = src;
More information about the parrot-commits
mailing list