Author: allison
Date: Wed Jan 28 23:25:12 2009
New Revision: 36137

Modified:
   branches/pdd28str_part2/compilers/imcc/imcc.y
   branches/pdd28str_part2/compilers/imcc/imcparser.c
   branches/pdd28str_part2/compilers/imcc/optimizer.c
   branches/pdd28str_part2/compilers/imcc/parser_util.c
   branches/pdd28str_part2/compilers/imcc/pbc.c
   branches/pdd28str_part2/compilers/pirc/src/bcgen.c
   branches/pdd28str_part2/compilers/pirc/src/pircompunit.c
   branches/pdd28str_part2/compilers/pirc/src/piremit.c
   branches/pdd28str_part2/config/gen/crypto/digest_pmc.in
   branches/pdd28str_part2/docs/embed.pod
   branches/pdd28str_part2/include/parrot/string_funcs.h
   branches/pdd28str_part2/languages/dotnet/pmc/dotnetassembly.pmc
   branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc
   branches/pdd28str_part2/languages/lua/src/pmc/luabytecode.pmc
   branches/pdd28str_part2/languages/regex/pmc/matchrange.pmc
   branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc
   branches/pdd28str_part2/src/dynpmc/rational.pmc
   branches/pdd28str_part2/src/extend.c
   branches/pdd28str_part2/src/inter_cb.c
   branches/pdd28str_part2/src/inter_misc.c
   branches/pdd28str_part2/src/jit/i386/jit_defs.c
   branches/pdd28str_part2/src/key.c
   branches/pdd28str_part2/src/library.c
   branches/pdd28str_part2/src/main.c
   branches/pdd28str_part2/src/multidispatch.c
   branches/pdd28str_part2/src/oo.c
   branches/pdd28str_part2/src/ops/core.ops
   branches/pdd28str_part2/src/ops/sys.ops
   branches/pdd28str_part2/src/packdump.c
   branches/pdd28str_part2/src/parrot_debugger.c
   branches/pdd28str_part2/src/pmc/bigint.pmc
   branches/pdd28str_part2/src/pmc/complex.pmc
   branches/pdd28str_part2/src/pmc/env.pmc
   branches/pdd28str_part2/src/pmc/filehandle.pmc
   branches/pdd28str_part2/src/pmc/fixedbooleanarray.pmc
   branches/pdd28str_part2/src/pmc/os.pmc
   branches/pdd28str_part2/src/pmc/packfile.pmc
   branches/pdd28str_part2/src/pmc/packfilefixupentry.pmc
   branches/pdd28str_part2/src/pmc/resizablebooleanarray.pmc
   branches/pdd28str_part2/src/pmc/resizablestringarray.pmc
   branches/pdd28str_part2/src/pmc/stringhandle.pmc
   branches/pdd28str_part2/src/string/api.c
   branches/pdd28str_part2/src/sub.c
   branches/pdd28str_part2/t/src/extend.t
   branches/pdd28str_part2/tools/build/nativecall.pl
   branches/pdd28str_part2/tools/dev/pbc_to_exe_gen.pl

Log:
[pdd28str] Renaming 'Parrot_str_new_from_cstring'.


Modified: branches/pdd28str_part2/compilers/imcc/imcc.y
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/imcc.y       (original)
+++ branches/pdd28str_part2/compilers/imcc/imcc.y       Wed Jan 28 23:25:12 2009
@@ -476,7 +476,7 @@
 
     r[1]          = rhs;
     rhs->pmc_type = pmc_type(interp,
-        string_from_cstring(interp, unquoted_name, name_length));
+        Parrot_str_new_from_cstring(interp, unquoted_name, name_length));
 
     mem_sys_free(unquoted_name);
     mem_sys_free(const_name);
@@ -1713,7 +1713,7 @@
            /* there'd normally be a str_dup() here, but the lexer already
             * copied the string, so it's safe to use directly */
            if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
-               string_from_cstring(interp, $1, 0))) <= 0) {
+               Parrot_str_new_from_cstring(interp, $1, 0))) <= 0) {
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "Unknown PMC type '%s'\n", $1);
            }

Modified: branches/pdd28str_part2/compilers/imcc/imcparser.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/imcparser.c  (original)
+++ branches/pdd28str_part2/compilers/imcc/imcparser.c  Wed Jan 28 23:25:12 2009
@@ -802,7 +802,7 @@
 
     r[1]          = rhs;
     rhs->pmc_type = pmc_type(interp,
-        string_from_cstring(interp, unquoted_name, name_length));
+        Parrot_str_new_from_cstring(interp, unquoted_name, name_length));
 
     mem_sys_free(unquoted_name);
     mem_sys_free(const_name);
@@ -4127,7 +4127,7 @@
            /* there'd normally be a str_dup() here, but the lexer already
             * copied the string, so it's safe to use directly */
            if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
-               string_from_cstring(interp, (yyvsp[(1) - (1)].s), 0))) <= 0) {
+               Parrot_str_new_from_cstring(interp, (yyvsp[(1) - (1)].s), 0))) 
<= 0) {
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));
            }

Modified: branches/pdd28str_part2/compilers/imcc/optimizer.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/optimizer.c  (original)
+++ branches/pdd28str_part2/compilers/imcc/optimizer.c  Wed Jan 28 23:25:12 2009
@@ -826,7 +826,7 @@
                             break;
                         case 'N':
                             {
-                            STRING * const s = string_from_cstring(interp, 
r[i]->name, 0);
+                            STRING * const s = 
Parrot_str_new_from_cstring(interp, r[i]->name, 0);
                             REG_NUM(interp, i) = string_to_num(interp, s);
                             }
                             break;

Modified: branches/pdd28str_part2/compilers/imcc/parser_util.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/parser_util.c        (original)
+++ branches/pdd28str_part2/compilers/imcc/parser_util.c        Wed Jan 28 
23:25:12 2009
@@ -152,7 +152,7 @@
     SymReg *pmc;
     int nargs;
     const int pmc_num = pmc_type(interp,
-            string_from_cstring(interp, *type == '.' ? type + 1 : type, 0));
+            Parrot_str_new_from_cstring(interp, *type == '.' ? type + 1 : 
type, 0));
 
     snprintf(fmt, sizeof (fmt), "%d", pmc_num);
     pmc = mk_const(interp, fmt, 'I');
@@ -698,7 +698,7 @@
         sub_data->seg        = new_cs;
         sub_data->start_offs = 0;
         sub_data->end_offs   = new_cs->base.size;
-        sub_data->name       = string_from_cstring(interp, name, 0);
+        sub_data->name       = Parrot_str_new_from_cstring(interp, name, 0);
 
         *error_message = NULL;
     }

Modified: branches/pdd28str_part2/compilers/imcc/pbc.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/pbc.c        (original)
+++ branches/pdd28str_part2/compilers/imcc/pbc.c        Wed Jan 28 23:25:12 2009
@@ -1060,7 +1060,7 @@
 {
     ASSERT_ARGS(add_const_num)
     const int      k = add_const_table(interp);
-    STRING * const s = string_from_cstring(interp, buf, 0);
+    STRING * const s = Parrot_str_new_from_cstring(interp, buf, 0);
 
     interp->code->const_table->constants[k]->type     = PFC_NUMBER;
     interp->code->const_table->constants[k]->u.number = string_to_num(interp, 
s);
@@ -1323,7 +1323,7 @@
     /* Do we have to create an instance of a specific type for this sub? */
     if (unit->instance_of) {
         /* Look it up as a class and as a PMC type. */
-        STRING * const classname = string_from_cstring(interp,
+        STRING * const classname = Parrot_str_new_from_cstring(interp,
                 unit->instance_of + 1, strlen(unit->instance_of) - 2);
 
         PMC * const classobj = Parrot_oo_get_class_str(interp, classname);
@@ -1420,7 +1420,7 @@
 
         /* Work out the name of the vtable method. */
         if (unit->vtable_name) {
-            vtable_name = string_from_cstring(interp, unit->vtable_name + 1,
+            vtable_name = Parrot_str_new_from_cstring(interp, 
unit->vtable_name + 1,
                     strlen(unit->vtable_name) - 2);
             UNIT_FREE_CHAR(unit->method_name);
         }
@@ -1450,7 +1450,7 @@
             sub->method_name = sub->name;
     }
     else
-        sub->method_name = string_from_cstring(interp, "", 0);
+        sub->method_name = Parrot_str_new_from_cstring(interp, "", 0);
 
 
     if (unit->has_ns_entry_name == 1) {

Modified: branches/pdd28str_part2/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/pdd28str_part2/compilers/pirc/src/bcgen.c  (original)
+++ branches/pdd28str_part2/compilers/pirc/src/bcgen.c  Wed Jan 28 23:25:12 2009
@@ -749,7 +749,7 @@
 
     /* walk through the list of lexicals and register them */
     while (lexiter) {
-        STRING *lexname = string_from_cstring(bc->interp, lexiter->name, 
strlen(lexiter->name));
+        STRING *lexname = Parrot_str_new_from_cstring(bc->interp, 
lexiter->name, strlen(lexiter->name));
 
         /* declare the .lex as such */
 
@@ -900,7 +900,7 @@
     if (instanceof) {
         /* Look it up as a class and as a PMC type. */
         STRING * const classname
-                 = string_from_cstring(bc->interp, instanceof + 1, 
strlen(instanceof) - 2);
+                 = Parrot_str_new_from_cstring(bc->interp, instanceof + 1, 
strlen(instanceof) - 2);
 
         PMC * const classobj = Parrot_oo_get_class_str(bc->interp, classname);
 

Modified: branches/pdd28str_part2/compilers/pirc/src/pircompunit.c
==============================================================================
--- branches/pdd28str_part2/compilers/pirc/src/pircompunit.c    (original)
+++ branches/pdd28str_part2/compilers/pirc/src/pircompunit.c    Wed Jan 28 
23:25:12 2009
@@ -199,7 +199,7 @@
 
     /* get the index number of this vtable method */
     vtable_index = Parrot_get_vtable_index(lexer->interp,
-                                           string_from_cstring(lexer->interp, 
vtablename,
+                                           
Parrot_str_new_from_cstring(lexer->interp, vtablename,
                                                                
strlen(vtablename)));
 
     /* now check whether the method name actually a vtable method */
@@ -894,7 +894,7 @@
 void
 load_library(lexer_state * const lexer, char const * const library) {
     /* see imcc.y:600 */
-    STRING *libname       = string_from_cstring(lexer->interp, library, 
strlen(library));
+    STRING *libname       = Parrot_str_new_from_cstring(lexer->interp, 
library, strlen(library));
     PMC    *ignored_value = Parrot_load_lib(lexer->interp, libname, NULL);
     UNUSED(ignored_value);
     Parrot_register_HLL_lib(lexer->interp, libname);
@@ -1442,9 +1442,9 @@
               char const * const name, constant * const value)
 {
     /* get a STRING representation of the c-string type */
-    STRING *classname    = string_from_cstring(lexer->interp, type, 
strlen(type));
+    STRING *classname    = Parrot_str_new_from_cstring(lexer->interp, type, 
strlen(type));
     /* get a STRING holding the c-string "Sub" */
-    STRING *subclassname = string_from_cstring(lexer->interp, "Sub", 3);
+    STRING *subclassname = Parrot_str_new_from_cstring(lexer->interp, "Sub", 
3);
     /* get a PMC for the class passed in type */
     PMC    *constclass   = Parrot_oo_get_class_str(lexer->interp, classname);
     /* check whether that PMC isa "Sub" */
@@ -1488,7 +1488,7 @@
     }
     else if (value->type == INT_VAL) {
 
-        STRING *intclassname = string_from_cstring(lexer->interp, "Integer", 
7);
+        STRING *intclassname = Parrot_str_new_from_cstring(lexer->interp, 
"Integer", 7);
         INTVAL  is_an_int    = VTABLE_isa(lexer->interp, constclass, 
intclassname);
 
         if (is_an_int) {
@@ -1523,7 +1523,7 @@
 
     }
     else if (value->type == NUM_VAL) {
-        STRING *numclassname  = string_from_cstring(lexer->interp, "Float", 5);
+        STRING *numclassname  = Parrot_str_new_from_cstring(lexer->interp, 
"Float", 5);
         INTVAL  is_a_num      = VTABLE_isa(lexer->interp, constclass, 
numclassname);
 
         if (is_a_num) {
@@ -1553,7 +1553,7 @@
         }
     }
     else if (value->type == STRING_VAL) {
-        STRING *strclassname = string_from_cstring(lexer->interp, "String", 6);
+        STRING *strclassname = Parrot_str_new_from_cstring(lexer->interp, 
"String", 6);
         INTVAL  is_a_string  = VTABLE_isa(lexer->interp, constclass, 
strclassname);
 
         if (is_a_string) {
@@ -1566,7 +1566,7 @@
             int     index     = add_pmc_const(lexer->bc, strconst);
 
             VTABLE_set_string_native(lexer->interp, strconst,
-                                     string_from_cstring(lexer->interp, 
value->val.sval,
+                                     
Parrot_str_new_from_cstring(lexer->interp, value->val.sval,
                                                          
strlen(value->val.sval)));
 
             declare_local(lexer, PMC_TYPE, constsym);
@@ -1995,7 +1995,7 @@
 */
 void
 set_hll(lexer_state * const lexer, char const * const hll) {
-    STRING * const hll_name             = string_from_cstring(lexer->interp, 
hll, strlen(hll));
+    STRING * const hll_name             = 
Parrot_str_new_from_cstring(lexer->interp, hll, strlen(hll));
     CONTEXT(lexer->interp)->current_HLL = Parrot_register_HLL(lexer->interp, 
hll_name);
 }
 
@@ -2021,8 +2021,8 @@
 void
 set_hll_map(lexer_state * const lexer, char const * const stdtype, char const 
* const maptype) {
     Parrot_Context *ctx           = CONTEXT(lexer->interp);
-    STRING * const  built_in_name = string_from_cstring(lexer->interp, 
stdtype, strlen(stdtype));
-    STRING * const  language_name = string_from_cstring(lexer->interp, 
maptype, strlen(maptype));
+    STRING * const  built_in_name = Parrot_str_new_from_cstring(lexer->interp, 
stdtype, strlen(stdtype));
+    STRING * const  language_name = Parrot_str_new_from_cstring(lexer->interp, 
maptype, strlen(maptype));
     int             built_in_type = pmc_type(lexer->interp, built_in_name);
     int             language_type = pmc_type(lexer->interp, language_name);
 

Modified: branches/pdd28str_part2/compilers/pirc/src/piremit.c
==============================================================================
--- branches/pdd28str_part2/compilers/pirc/src/piremit.c        (original)
+++ branches/pdd28str_part2/compilers/pirc/src/piremit.c        Wed Jan 28 
23:25:12 2009
@@ -787,7 +787,7 @@
             int index     = add_pmc_const(lexer->bc, strconst);
 
             VTABLE_set_string_native(lexer->interp, strconst,
-                                     string_from_cstring(lexer->interp,
+                                     Parrot_str_new_from_cstring(lexer->interp,
                                                          
second_operand->expr.c->val.sval,
                                                          
strlen(second_operand->expr.c->val.sval)));
 

Modified: branches/pdd28str_part2/config/gen/crypto/digest_pmc.in
==============================================================================
--- branches/pdd28str_part2/config/gen/crypto/digest_pmc.in     (original)
+++ branches/pdd28str_part2/config/gen/crypto/digest_pmc.in     Wed Jan 28 
23:25:12 2009
@@ -132,7 +132,7 @@
         STRING       *retval;
 
         (void)@md_n...@_final(digest, c);
-        retval = string_from_cstring(INTERP, (char *)digest, 
@md_dig...@_length);
+        retval = Parrot_str_new_from_cstring(INTERP, (char *)digest, 
@md_dig...@_length);
 
         RETURN(STRING *retval);
 #else

Modified: branches/pdd28str_part2/docs/embed.pod
==============================================================================
--- branches/pdd28str_part2/docs/embed.pod      (original)
+++ branches/pdd28str_part2/docs/embed.pod      Wed Jan 28 23:25:12 2009
@@ -290,7 +290,7 @@
 XXX needs to be a formal Parrot_* API.
 Returns the C string representation of a Parrot string.
 
-=item C<STRING *string_from_cstring(PARROT_INTERP, const char *string, int 
len)>
+=item C<STRING *Parrot_str_new_from_cstring(PARROT_INTERP, const char *string, 
int len)>
 
 XXX needs to be a formal Parrot_* API.
 Returns the Parrot string representation of a C string.
@@ -298,7 +298,7 @@
 =item C<string_from_literal(PARROT_INTERP, const char *string)>
 
 XXX needs to be a formal Parrot_* API.
-A macro for simplifying calls to C<string_from_cstring>.
+A macro for simplifying calls to C<Parrot_str_new_from_cstring>.
 
 =back
 

Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h       (original)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h       Wed Jan 28 
23:25:12 2009
@@ -19,7 +19,7 @@
 
 /* Declarations of accessors */
 
-#define string_from_literal(i, s) string_from_cstring((i), (s), (sizeof (s)-1))
+#define string_from_literal(i, s) Parrot_str_new_from_cstring((i), (s), 
(sizeof (s)-1))
 #define Parrot_unCOW_string(i, s) PObj_COW_TEST((s)) ? \
     Parrot_str_write_COW((i), (s)), (s) : (s)
 
@@ -281,7 +281,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-STRING * string_from_cstring(PARROT_INTERP,
+STRING * Parrot_str_new_from_cstring(PARROT_INTERP,
     ARGIN_NULLOK(const char * const buffer),
     const UINTVAL len)
         __attribute__nonnull__(1);
@@ -637,7 +637,7 @@
 #define ASSERT_ARGS_string_escape_string_delimited \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_from_cstring __attribute__unused__ int 
_ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_new_from_cstring __attribute__unused__ int 
_ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_string_from_int __attribute__unused__ int 
_ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)

Modified: branches/pdd28str_part2/languages/dotnet/pmc/dotnetassembly.pmc
==============================================================================
--- branches/pdd28str_part2/languages/dotnet/pmc/dotnetassembly.pmc     
(original)
+++ branches/pdd28str_part2/languages/dotnet/pmc/dotnetassembly.pmc     Wed Jan 
28 23:25:12 2009
@@ -897,7 +897,7 @@
     else
         pos_name = stream_word_u(ass->tables, row_addr + 4);
     if (pos_name)
-        param->str_name = string_from_cstring(INTERP, ass->strings + pos_name, 
0);
+        param->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
     else
         param->str_name = NULL;
 
@@ -947,7 +947,7 @@
         cur_pos = 6;
     }
     if (pos_name)
-        field->str_name = string_from_cstring(INTERP, ass->strings + pos_name, 
0);
+        field->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
     else
         field->str_name = NULL;
 
@@ -1011,7 +1011,7 @@
         cur_pos = 12;
     }
     if (pos_name)
-        method->str_name = string_from_cstring(INTERP, ass->strings + 
pos_name, 0);
+        method->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
     else
         method->str_name = NULL;
 
@@ -1187,12 +1187,12 @@
         cur_pos = 12;
     }
     if (pos_name)
-        type->str_name = string_from_cstring(INTERP, ass->strings + pos_name, 
0);
+        type->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
     else
         type->str_name = NULL;
     if (pos_namespace)
     {
-        type->str_namespace = string_from_cstring(INTERP,
+        type->str_namespace = Parrot_str_new_from_cstring(INTERP,
             ass->strings + pos_namespace, 0);
         type->str_fullname = Parrot_str_concat(INTERP, type->str_namespace,
             string_from_literal(INTERP, "."), 0);
@@ -1357,11 +1357,11 @@
         pos_namespace = stream_word_u(ass->tables, row_addr + cur_pos + 4);
     }
     if (pos_name)
-        typeref->str_name = string_from_cstring(INTERP, ass->strings + 
pos_name, 0);
+        typeref->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
     else
         typeref->str_name = NULL;
     if (pos_namespace)
-        typeref->str_namespace = string_from_cstring(INTERP,
+        typeref->str_namespace = Parrot_str_new_from_cstring(INTERP,
             ass->strings + pos_namespace, 0);
     else
         typeref->str_namespace = NULL;
@@ -1425,7 +1425,7 @@
         pos_name = stream_word_u(ass->tables, row_addr + cur_pos);
         cur_pos += 4;
     }
-    memberref->str_name = string_from_cstring(INTERP, ass->strings + pos_name, 
0);
+    memberref->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
 
     /* Get signature. */
     if (ass->blobs_ptr_size == 2)
@@ -1493,7 +1493,7 @@
         pos_name = stream_word_u(ass->tables, row_addr + cur_pos);
         cur_pos += 4;
     }
-    assemblyref->str_name = string_from_cstring(INTERP, ass->strings + 
pos_name, 0);
+    assemblyref->str_name = Parrot_str_new_from_cstring(INTERP, ass->strings + 
pos_name, 0);
 
     /* Get culture. */
     if (ass->strings_ptr_size == 2)
@@ -1506,7 +1506,7 @@
         pos_culture = stream_word_u(ass->tables, row_addr + cur_pos);
         cur_pos += 4;
     }
-    assemblyref->str_culture = string_from_cstring(INTERP, ass->strings + 
pos_culture, 0);
+    assemblyref->str_culture = Parrot_str_new_from_cstring(INTERP, 
ass->strings + pos_culture, 0);
 
     /* Get hash value blob index. */
     if (ass->blobs_ptr_size == 2)
@@ -1935,7 +1935,7 @@
         /* Create and return a new string (pass 0 as length; end found
            automatically). */
 
-        result = string_from_cstring(INTERP, ass->strings + i, 0);
+        result = Parrot_str_new_from_cstring(INTERP, ass->strings + i, 0);
         RETURN(STRING *result);
     }
 
@@ -2039,7 +2039,7 @@
                "Blob position and length out of range");
 
         /* Return string containing blob. */
-        out = string_from_cstring(INTERP, ass->blobs + start, length);
+        out = Parrot_str_new_from_cstring(INTERP, ass->blobs + start, length);
         if (!out)
             Parrot_ex_throw_from_c_args(INTERP, NULL, 
EXCEPTION_INVALID_OPERATION,
                "Unable to create blob string");

Modified: branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc       (original)
+++ branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc       Wed Jan 28 
23:25:12 2009
@@ -146,7 +146,7 @@
         if (p) {
             retval = pmc_new(INTERP, dynpmc_LuaString);
             VTABLE_set_string_native(INTERP, retval,
-                                     string_from_cstring(INTERP, p, 0));
+                                     Parrot_str_new_from_cstring(INTERP, p, 
0));
         }
         else
             retval = pmc_new(INTERP, dynpmc_LuaNil);
@@ -183,7 +183,7 @@
             string_cstring_free(s);
         }
 
-        retval = string_from_cstring(INTERP, b, reslen);
+        retval = Parrot_str_new_from_cstring(INTERP, b, reslen);
         RETURN(STRING *retval);
     }
 
@@ -213,7 +213,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, 1,
                 "unable to generate a unique filename");
 
-        retval = string_from_cstring(INTERP, buff, 0);
+        retval = Parrot_str_new_from_cstring(INTERP, buff, 0);
         RETURN(STRING *retval);
     }
 

Modified: branches/pdd28str_part2/languages/lua/src/pmc/luabytecode.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luabytecode.pmc       
(original)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luabytecode.pmc       Wed Jan 
28 23:25:12 2009
@@ -112,11 +112,11 @@
     memcpy(&s, fp, sizeof s);
     fp += sizeof s;
     if (s != 0) {
-        str = string_from_cstring(interp, fp, s-1);
+        str = Parrot_str_new_from_cstring(interp, fp, s-1);
         fp += s;
     }
     else
-        str = string_from_cstring(interp, "", 0);
+        str = Parrot_str_new_from_cstring(interp, "", 0);
     return str;
 }
 

Modified: branches/pdd28str_part2/languages/regex/pmc/matchrange.pmc
==============================================================================
--- branches/pdd28str_part2/languages/regex/pmc/matchrange.pmc  (original)
+++ branches/pdd28str_part2/languages/regex/pmc/matchrange.pmc  Wed Jan 28 
23:25:12 2009
@@ -54,12 +54,12 @@
 static INTVAL*
 matchrange_locate_keyed_int(Interp* interp, PMC* self, STRING *key)
 {
-    STRING *start = string_from_cstring(interp, "start", 5);
+    STRING *start = Parrot_str_new_from_cstring(interp, "start", 5);
     STRING *end;
 
     if (0 == string_equal(interp, key, start))
         return &RANGE_START(self);
-    end = string_from_cstring(interp, "end", 3);
+    end = Parrot_str_new_from_cstring(interp, "end", 3);
     if (0 == string_equal(interp, key, end))
         return &RANGE_END(self);
     Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,

Modified: branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc     (original)
+++ branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc     Wed Jan 28 23:25:12 2009
@@ -235,7 +235,7 @@
         key_gdbm.dptr  = keystr->strstart;
         val_gdbm       = gdbm_fetch(dbf, key_gdbm);
 
-        val = string_from_cstring(interp, val_gdbm.dptr, val_gdbm.dsize);
+        val = Parrot_str_new_from_cstring(interp, val_gdbm.dptr, 
val_gdbm.dsize);
         free(val_gdbm.dptr);
 
         return val;

Modified: branches/pdd28str_part2/src/dynpmc/rational.pmc
==============================================================================
--- branches/pdd28str_part2/src/dynpmc/rational.pmc     (original)
+++ branches/pdd28str_part2/src/dynpmc/rational.pmc     Wed Jan 28 23:25:12 2009
@@ -55,7 +55,7 @@
 static STRING *rat_get_string_to_base(PARROT_INTERP, PMC *self, int base) {
   #ifdef PARROT_HAS_GMP
     char * const cstr = mpq_get_str(NULL, (int) base, RT(self));
-    STRING * pstr     = string_from_cstring(interp, cstr, 0);
+    STRING * pstr     = Parrot_str_new_from_cstring(interp, cstr, 0);
     string_cstring_free(cstr);
     return pstr;
   #else
@@ -286,9 +286,9 @@
     METHOD version() {
         STRING *version;
       #ifdef PARROT_HAS_GMP
-        version = string_from_cstring(INTERP, gmp_version, 0);
+        version = Parrot_str_new_from_cstring(INTERP, gmp_version, 0);
       #else
-        version = string_from_cstring(INTERP, "0.0.0", 0);
+        version = Parrot_str_new_from_cstring(INTERP, "0.0.0", 0);
       #endif
         RETURN(STRING *version);
     }

Modified: branches/pdd28str_part2/src/extend.c
==============================================================================
--- branches/pdd28str_part2/src/extend.c        (original)
+++ branches/pdd28str_part2/src/extend.c        Wed Jan 28 23:25:12 2009
@@ -683,7 +683,7 @@
     ASSERT_ARGS(Parrot_PMC_set_cstring)
     PARROT_CALLIN_START(interp);
     VTABLE_set_string_native(interp, pmc,
-                             string_from_cstring(interp, value, 0));
+                             Parrot_str_new_from_cstring(interp, value, 0));
     PARROT_CALLIN_END(interp);
 }
 
@@ -705,7 +705,7 @@
     ASSERT_ARGS(Parrot_PMC_set_cstring_intkey)
     PARROT_CALLIN_START(interp);
     VTABLE_set_string_keyed_int(interp, pmc, key,
-                                string_from_cstring(interp, value, 0));
+                                Parrot_str_new_from_cstring(interp, value, 0));
     PARROT_CALLIN_END(interp);
 }
 
@@ -727,7 +727,7 @@
     ASSERT_ARGS(Parrot_PMC_set_cstringn)
     PARROT_CALLIN_START(interp);
     VTABLE_set_string_native(interp, pmc,
-                             string_from_cstring(interp, value, length));
+                             Parrot_str_new_from_cstring(interp, value, 
length));
     PARROT_CALLIN_END(interp);
 }
 
@@ -811,7 +811,7 @@
     ASSERT_ARGS(Parrot_PMC_set_cstringn_intkey)
     PARROT_CALLIN_START(interp);
     VTABLE_set_string_keyed_int(interp, pmc, key,
-                                string_from_cstring(interp, value, length));
+                                Parrot_str_new_from_cstring(interp, value, 
length));
     PARROT_CALLIN_END(interp);
 }
 
@@ -855,7 +855,7 @@
     ASSERT_ARGS(Parrot_PMC_typenum)
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
-    retval = pmc_type(interp, string_from_cstring(interp, _class, 0));
+    retval = pmc_type(interp, Parrot_str_new_from_cstring(interp, _class, 0));
     PARROT_CALLIN_END(interp);
     return retval;
 }

Modified: branches/pdd28str_part2/src/inter_cb.c
==============================================================================
--- branches/pdd28str_part2/src/inter_cb.c      (original)
+++ branches/pdd28str_part2/src/inter_cb.c      Wed Jan 28 23:25:12 2009
@@ -356,7 +356,7 @@
 #endif
         case 't':
             pasm_sig[2] = 'S';
-            param = string_from_cstring(interp, external_data, 0);
+            param = Parrot_str_new_from_cstring(interp, external_data, 0);
             break;
         default:
             Parrot_ex_throw_from_c_args(interp, NULL, 1,

Modified: branches/pdd28str_part2/src/inter_misc.c
==============================================================================
--- branches/pdd28str_part2/src/inter_misc.c    (original)
+++ branches/pdd28str_part2/src/inter_misc.c    Wed Jan 28 23:25:12 2009
@@ -398,7 +398,7 @@
                 if (pos > 0)
                     pos++;
 
-                basename = string_from_cstring(interp, fullname_c + pos, 0);
+                basename = Parrot_str_new_from_cstring(interp, fullname_c + 
pos, 0);
                 mem_sys_free(fullname_c);
 
                 return basename;

Modified: branches/pdd28str_part2/src/jit/i386/jit_defs.c
==============================================================================
--- branches/pdd28str_part2/src/jit/i386/jit_defs.c     (original)
+++ branches/pdd28str_part2/src/jit/i386/jit_defs.c     Wed Jan 28 23:25:12 2009
@@ -2584,7 +2584,7 @@
             /* overrights address of st in EBP(4) */
             emitm_movl_r_m(interp, pc, emit_EAX, emit_EBP, 0, 1, 
temp_calls_offset + 4);
 
-            emitm_call_cfunc(pc, string_from_cstring);
+            emitm_call_cfunc(pc, Parrot_str_new_from_cstring);
 
             emitm_movl_r_m(interp, pc, emit_EAX, emit_EBP, 0, 1, 
temp_calls_offset + 8);
 

Modified: branches/pdd28str_part2/src/key.c
==============================================================================
--- branches/pdd28str_part2/src/key.c   (original)
+++ branches/pdd28str_part2/src/key.c   Wed Jan 28 23:25:12 2009
@@ -141,7 +141,7 @@
 key_new_cstring(PARROT_INTERP, ARGIN_NULLOK(const char *value))
 {
     ASSERT_ARGS(key_new_cstring)
-    return key_new_string(interp, string_from_cstring(interp, value, 0));
+    return key_new_string(interp, Parrot_str_new_from_cstring(interp, value, 
0));
 }
 
 
@@ -589,7 +589,7 @@
     ASSERT_ARGS(key_set_to_string)
     STRING * const semicolon = CONST_STRING(interp, " ; ");
     STRING * const quote     = CONST_STRING(interp, "'");
-    STRING        *value     = string_from_cstring(interp, "[ ", 2);
+    STRING        *value     = Parrot_str_new_from_cstring(interp, "[ ", 2);
 
     for (; key; key = (PMC *)PMC_data(key)) {
         switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
@@ -633,7 +633,7 @@
             value = Parrot_str_append(interp, value, semicolon);
     }
 
-    value = Parrot_str_append(interp, value, string_from_cstring(interp, " ]", 
2));
+    value = Parrot_str_append(interp, value, 
Parrot_str_new_from_cstring(interp, " ]", 2));
     return value;
 }
 

Modified: branches/pdd28str_part2/src/library.c
==============================================================================
--- branches/pdd28str_part2/src/library.c       (original)
+++ branches/pdd28str_part2/src/library.c       Wed Jan 28 23:25:12 2009
@@ -593,7 +593,7 @@
     PMC * const lib_paths = VTABLE_get_pmc_keyed_int(interp, iglobals,
         IGLOBALS_LIB_PATHS);
     PMC * paths = VTABLE_get_pmc_keyed_int(interp, lib_paths, which);
-    STRING * const path_str = string_from_cstring(interp, path, 0);
+    STRING * const path_str = Parrot_str_new_from_cstring(interp, path, 0);
     VTABLE_push_string(interp, paths, path_str);
 }
 
@@ -682,7 +682,7 @@
         enum_runtime_ft type)
 {
     ASSERT_ARGS(Parrot_locate_runtime_file)
-    STRING * const file   = string_from_cstring(interp, file_name, 0);
+    STRING * const file   = Parrot_str_new_from_cstring(interp, file_name, 0);
     STRING * const result = Parrot_locate_runtime_file_str(interp, file, type);
     /*
      * XXX valgrind shows e.g.
@@ -757,7 +757,7 @@
 
     if (env)
     {
-        result = string_from_cstring(interp, env, 0);
+        result = Parrot_str_new_from_cstring(interp, env, 0);
         if (free_it)
              free(env);
     }

Modified: branches/pdd28str_part2/src/main.c
==============================================================================
--- branches/pdd28str_part2/src/main.c  (original)
+++ branches/pdd28str_part2/src/main.c  Wed Jan 28 23:25:12 2009
@@ -55,7 +55,7 @@
     /* We parse the arguments, but first store away the name of the Parrot
        executable, since parsing destroys that and we want to make it
        available. */
-    Parrot_set_executable_name(interp, string_from_cstring(interp, argv[0], 
0));
+    Parrot_set_executable_name(interp, Parrot_str_new_from_cstring(interp, 
argv[0], 0));
 
     sourcefile = parseflags(interp, &argc, &argv);
     status     = imcc_run(interp, sourcefile, argc, argv);

Modified: branches/pdd28str_part2/src/multidispatch.c
==============================================================================
--- branches/pdd28str_part2/src/multidispatch.c (original)
+++ branches/pdd28str_part2/src/multidispatch.c Wed Jan 28 23:25:12 2009
@@ -1559,7 +1559,7 @@
     if (name)
         strcpy((char *)(type_ids + num_values), name);
 
-    key = string_from_cstring(interp, (char *)type_ids, id_size);
+    key = Parrot_str_new_from_cstring(interp, (char *)type_ids, id_size);
     mem_sys_free(type_ids);
 
     return key;
@@ -1656,7 +1656,7 @@
     if (name)
         strcpy((char *)(type_ids + num_types), name);
 
-    key = string_from_cstring(interp, (char *)type_ids, id_size);
+    key = Parrot_str_new_from_cstring(interp, (char *)type_ids, id_size);
 
     mem_sys_free(type_ids);
     return key;

Modified: branches/pdd28str_part2/src/oo.c
==============================================================================
--- branches/pdd28str_part2/src/oo.c    (original)
+++ branches/pdd28str_part2/src/oo.c    Wed Jan 28 23:25:12 2009
@@ -133,7 +133,7 @@
             /* Look up the name of the vtable function from the index. */
             const INTVAL vtable_index = string_to_int(interp, 
vtable_index_str);
             const char * const meth_c = Parrot_vtable_slot_names[vtable_index];
-            STRING     *vtable_name   = string_from_cstring(interp, meth_c, 0);
+            STRING     *vtable_name   = Parrot_str_new_from_cstring(interp, 
meth_c, 0);
 
             /* Strip leading underscores in the vtable name */
             if (string_str_index(interp, vtable_name, CONST_STRING(interp, 
"__"), 0) == 0) {

Modified: branches/pdd28str_part2/src/ops/core.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/core.ops    (original)
+++ branches/pdd28str_part2/src/ops/core.ops    Wed Jan 28 23:25:12 2009
@@ -837,7 +837,7 @@
 
 inline op pop_eh() {
     Parrot_cx_delete_handler_local(interp,
-            string_from_cstring(interp, "exception", 9));
+            Parrot_str_new_from_cstring(interp, "exception", 9));
 }
 
 inline op throw(invar PMC) :flow {
@@ -867,7 +867,7 @@
 
 inline op count_eh(out INT) {
     $1 = Parrot_cx_count_handlers_local(interp,
-            string_from_cstring(interp, "exception", 9));
+            Parrot_str_new_from_cstring(interp, "exception", 9));
 }
 
 inline op die(in STR) :flow {

Modified: branches/pdd28str_part2/src/ops/sys.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/sys.ops     (original)
+++ branches/pdd28str_part2/src/ops/sys.ops     Wed Jan 28 23:25:12 2009
@@ -178,7 +178,7 @@
   char resultbuffer[26];
   Parrot_gmtime_r(&t, &tm);
   Parrot_asctime_r(&tm, resultbuffer);
-  $1 = string_from_cstring(interp, resultbuffer, 25);
+  $1 = Parrot_str_new_from_cstring(interp, resultbuffer, 25);
 }
 
 op localtime(out STR, in INT) {
@@ -187,7 +187,7 @@
   char resultbuffer[26];
   Parrot_localtime_r(&t, &tm);
   Parrot_asctime_r(&tm, resultbuffer);
-  $1 = string_from_cstring(interp, resultbuffer, 25);
+  $1 = Parrot_str_new_from_cstring(interp, resultbuffer, 25);
 }
 
 op decodetime(out PMC, in INT) {

Modified: branches/pdd28str_part2/src/packdump.c
==============================================================================
--- branches/pdd28str_part2/src/packdump.c      (original)
+++ branches/pdd28str_part2/src/packdump.c      Wed Jan 28 23:25:12 2009
@@ -294,13 +294,13 @@
                     if (sub->namespace_name) {
                         switch (sub->namespace_name->vtable->base_type) {
                             case enum_class_String:
-                                namespace_description = 
string_from_cstring(interp, "'", 1);
+                                namespace_description = 
Parrot_str_new_from_cstring(interp, "'", 1);
                                 namespace_description = 
Parrot_str_append(interp,
                                         namespace_description,
                                         PMC_str_val(sub->namespace_name));
                                 namespace_description = 
Parrot_str_append(interp,
                                         namespace_description,
-                                        string_from_cstring(interp, "'", 1));
+                                        Parrot_str_new_from_cstring(interp, 
"'", 1));
                                 break;
                             case enum_class_Key:
                                 namespace_description =

Modified: branches/pdd28str_part2/src/parrot_debugger.c
==============================================================================
--- branches/pdd28str_part2/src/parrot_debugger.c       (original)
+++ branches/pdd28str_part2/src/parrot_debugger.c       Wed Jan 28 23:25:12 2009
@@ -148,7 +148,7 @@
 
     interp = Parrot_new(NULL);
 
-    Parrot_set_executable_name(interp, string_from_cstring(interp, argv[0], 
0));
+    Parrot_set_executable_name(interp, Parrot_str_new_from_cstring(interp, 
argv[0], 0));
 
     Parrot_debugger_init(interp);
 

Modified: branches/pdd28str_part2/src/pmc/bigint.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/bigint.pmc  (original)
+++ branches/pdd28str_part2/src/pmc/bigint.pmc  Wed Jan 28 23:25:12 2009
@@ -588,7 +588,7 @@
     METHOD version() {
         STRING *version;
 #ifdef PARROT_HAS_GMP
-        version = string_from_cstring(INTERP, gmp_version, 0);
+        version = Parrot_str_new_from_cstring(INTERP, gmp_version, 0);
 #else
         version = CONST_STRING(INTERP, "0.0.0");
 #endif
@@ -793,14 +793,14 @@
 
     VTABLE STRING *get_string() {
         char   *s  = bigint_get_string(INTERP, SELF, 10);
-        STRING *ps = string_from_cstring(INTERP, s, 0);
+        STRING *ps = Parrot_str_new_from_cstring(INTERP, s, 0);
         mem_sys_free(s);
         return ps;
     }
 
     VTABLE STRING *get_string_keyed_int(INTVAL base) {
         char   *s  = bigint_get_string(INTERP, SELF, base);
-        STRING *ps = string_from_cstring(INTERP, s, 0);
+        STRING *ps = Parrot_str_new_from_cstring(INTERP, s, 0);
         mem_sys_free(s);
         return ps;
     }

Modified: branches/pdd28str_part2/src/pmc/complex.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/complex.pmc (original)
+++ branches/pdd28str_part2/src/pmc/complex.pmc Wed Jan 28 23:25:12 2009
@@ -164,7 +164,7 @@
 
     if (first_num_length) {
         /* there is a real part, interpret it */
-        S   = string_from_cstring(interp, first_num_offset, first_num_length);
+        S   = Parrot_str_new_from_cstring(interp, first_num_offset, 
first_num_length);
         *re = string_to_num(interp, S);
     }
     else {
@@ -174,7 +174,7 @@
 
     if (second_num_length) {
         /* there is an imaginary part, interpret it */
-        S   = string_from_cstring(interp, second_num_offset, 
second_num_length);
+        S   = Parrot_str_new_from_cstring(interp, second_num_offset, 
second_num_length);
         *im = string_to_num(interp, S);
     }
     else {

Modified: branches/pdd28str_part2/src/pmc/env.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/env.pmc     (original)
+++ branches/pdd28str_part2/src/pmc/env.pmc     Wed Jan 28 23:25:12 2009
@@ -153,7 +153,7 @@
             else {
                 const char * const envp = environ[keynum];
                 const char * const p    = strchr(envp, '=');
-                return string_from_cstring(interp, envp, (UINTVAL)(p - envp));
+                return Parrot_str_new_from_cstring(interp, envp, (UINTVAL)(p - 
envp));
             }
         }
         else {
@@ -166,7 +166,7 @@
                 string_cstring_free(keyname);
 
                 if (val) {
-                    STRING * const retval = string_from_cstring(interp, val, 
0);
+                    STRING * const retval = 
Parrot_str_new_from_cstring(interp, val, 0);
 
                     if (free_it)
                         mem_sys_free(val);
@@ -204,7 +204,7 @@
             string_cstring_free(keyname);
 
             if (val) {
-                retval = string_from_cstring(INTERP, val, 0);
+                retval = Parrot_str_new_from_cstring(INTERP, val, 0);
                 if (free_it)
                     mem_sys_free(val);
             }

Modified: branches/pdd28str_part2/src/pmc/filehandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/filehandle.pmc      (original)
+++ branches/pdd28str_part2/src/pmc/filehandle.pmc      Wed Jan 28 23:25:12 2009
@@ -348,7 +348,7 @@
             if (*r)
                 add_history(r);
 
-            string_result = string_from_cstring(INTERP, r, 0);
+            string_result = Parrot_str_new_from_cstring(INTERP, r, 0);
             mem_sys_free(r);
             RETURN(STRING *string_result);
         }

Modified: branches/pdd28str_part2/src/pmc/fixedbooleanarray.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/fixedbooleanarray.pmc       (original)
+++ branches/pdd28str_part2/src/pmc/fixedbooleanarray.pmc       Wed Jan 28 
23:25:12 2009
@@ -519,7 +519,7 @@
         GET_ATTR_resize_threshold(INTERP, SELF, resize_threshold);
         GET_ATTR_bit_array(INTERP, SELF, bit_array);
 
-        s = string_from_cstring(INTERP, (char*)bit_array,
+        s = Parrot_str_new_from_cstring(INTERP, (char*)bit_array,
                 (resize_threshold / BITS_PER_CHAR));
 
         VTABLE_push_integer(INTERP, io, size);

Modified: branches/pdd28str_part2/src/pmc/os.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/os.pmc      (original)
+++ branches/pdd28str_part2/src/pmc/os.pmc      Wed Jan 28 23:25:12 2009
@@ -87,7 +87,7 @@
 #  endif
 #endif
         if (cwd) {
-            STRING * const scwd = string_from_cstring(interp, cwd, 
strlen(cwd));
+            STRING * const scwd = Parrot_str_new_from_cstring(interp, cwd, 
strlen(cwd));
             mem_sys_free(cwd);
             RETURN(STRING *scwd);
         }
@@ -492,7 +492,7 @@
         array = pmc_new(interp, enum_class_ResizableStringArray);
 
         while ((dirent = readdir(dir)) != NULL) {
-            retval = string_from_cstring(interp, dirent->d_name, 0) ;
+            retval = Parrot_str_new_from_cstring(interp, dirent->d_name, 0) ;
             VTABLE_push_string(interp, array, retval);
         }
 

Modified: branches/pdd28str_part2/src/pmc/packfile.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/packfile.pmc        (original)
+++ branches/pdd28str_part2/src/pmc/packfile.pmc        Wed Jan 28 23:25:12 2009
@@ -176,7 +176,7 @@
     VTABLE STRING *get_string_keyed_str(STRING *key) {
         PackFile *pf = PMC_data_typed(SELF, PackFile *);
         if (!string_compare(interp, key, CONST_STRING(interp, "uuid")))
-            return string_from_cstring(interp, (char*)pf->header->uuid_data, 
pf->header->uuid_size);
+            return Parrot_str_new_from_cstring(interp, 
(char*)pf->header->uuid_data, pf->header->uuid_size);
 
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
                        "Packfile: No such string key \"%s\"",

Modified: branches/pdd28str_part2/src/pmc/packfilefixupentry.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/packfilefixupentry.pmc      (original)
+++ branches/pdd28str_part2/src/pmc/packfilefixupentry.pmc      Wed Jan 28 
23:25:12 2009
@@ -34,7 +34,7 @@
 */
     VTABLE STRING *get_string() {
         PackFile_FixupEntry *pfentry = PMC_data_typed(SELF, 
PackFile_FixupEntry *);
-        return string_from_cstring(interp, pfentry->name, 
strlen(pfentry->name));
+        return Parrot_str_new_from_cstring(interp, pfentry->name, 
strlen(pfentry->name));
     }
 
 /*

Modified: branches/pdd28str_part2/src/pmc/resizablebooleanarray.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/resizablebooleanarray.pmc   (original)
+++ branches/pdd28str_part2/src/pmc/resizablebooleanarray.pmc   Wed Jan 28 
23:25:12 2009
@@ -435,7 +435,7 @@
         VTABLE_push_integer(INTERP, io, head_pos);
         VTABLE_push_integer(INTERP, io, tail_pos);
 
-        s = string_from_cstring(INTERP, (char*)bit_array, tail_pos);
+        s = Parrot_str_new_from_cstring(INTERP, (char*)bit_array, tail_pos);
 
         VTABLE_push_string(INTERP, io, s);
     }

Modified: branches/pdd28str_part2/src/pmc/resizablestringarray.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/resizablestringarray.pmc    (original)
+++ branches/pdd28str_part2/src/pmc/resizablestringarray.pmc    Wed Jan 28 
23:25:12 2009
@@ -54,7 +54,7 @@
         data = (STRING**)PMC_data(SELF);
 
         if (!data[key])
-            data[key] = string_from_cstring(interp, NULL, 0);
+            data[key] = Parrot_str_new_from_cstring(interp, NULL, 0);
 
         return data[key];
     }

Modified: branches/pdd28str_part2/src/pmc/stringhandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/stringhandle.pmc    (original)
+++ branches/pdd28str_part2/src/pmc/stringhandle.pmc    Wed Jan 28 23:25:12 2009
@@ -175,7 +175,7 @@
             &&  string_equal(INTERP, encoding, CONST_STRING(INTERP, "utf8")) 
== 0)
                 new_string = string_make(INTERP, "", 0, "unicode", 0);
             else
-                new_string = string_from_cstring(INTERP, "", 0);
+                new_string = Parrot_str_new_from_cstring(INTERP, "", 0);
 
             SET_ATTR_stringhandle(INTERP, SELF, new_string);
         }

Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c    (original)
+++ branches/pdd28str_part2/src/string/api.c    Wed Jan 28 23:25:12 2009
@@ -607,7 +607,7 @@
 
 /*
 
-=item C<STRING * string_from_cstring>
+=item C<STRING * Parrot_str_new_from_cstring>
 
 Make a Parrot string from a specified C string.
 
@@ -620,9 +620,9 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 STRING *
-string_from_cstring(PARROT_INTERP, ARGIN_NULLOK(const char * const buffer), 
const UINTVAL len)
+Parrot_str_new_from_cstring(PARROT_INTERP, ARGIN_NULLOK(const char * const 
buffer), const UINTVAL len)
 {
-    ASSERT_ARGS(string_from_cstring)
+    ASSERT_ARGS(Parrot_str_new_from_cstring)
     return string_make_direct(interp, buffer, len ? len :
             buffer ? strlen(buffer) : 0,
                               PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,

Modified: branches/pdd28str_part2/src/sub.c
==============================================================================
--- branches/pdd28str_part2/src/sub.c   (original)
+++ branches/pdd28str_part2/src/sub.c   Wed Jan 28 23:25:12 2009
@@ -418,9 +418,9 @@
 
     /* is the current sub of the specified context valid? */
     if (PMC_IS_NULL(ctx->current_sub)) {
-        info->subname  = string_from_cstring(interp, "???", 3);
+        info->subname  = Parrot_str_new_from_cstring(interp, "???", 3);
         info->nsname   = info->subname;
-        info->fullname = string_from_cstring(interp, "??? :: ???", 10);
+        info->fullname = Parrot_str_new_from_cstring(interp, "??? :: ???", 10);
         info->pc       = -1;
         return 0;
     }

Modified: branches/pdd28str_part2/t/src/extend.t
==============================================================================
--- branches/pdd28str_part2/t/src/extend.t      (original)
+++ branches/pdd28str_part2/t/src/extend.t      Wed Jan 28 23:25:12 2009
@@ -457,7 +457,7 @@
     arg  = pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
-                 string_from_cstring(interp, "hello ", 0));
+                 Parrot_str_new_from_cstring(interp, "hello ", 0));
 
     Parrot_call_sub(interp, sub, "vP", arg);
     Parrot_eprintf(interp, "back\\n");

Modified: branches/pdd28str_part2/tools/build/nativecall.pl
==============================================================================
--- branches/pdd28str_part2/tools/build/nativecall.pl   (original)
+++ branches/pdd28str_part2/tools/build/nativecall.pl   Wed Jan 28 23:25:12 2009
@@ -53,7 +53,7 @@
     d => { as_proto => "double", sig_char => "N" },
     t => { as_proto => "char *",
            other_decl => "STRING *final_destination;",
-           ret_assign => "final_destination = string_from_cstring(interp, 
return_data, 0);\n    set_nci_S(interp, &st, final_destination);",
+           ret_assign => "final_destination = 
Parrot_str_new_from_cstring(interp, return_data, 0);\n    set_nci_S(interp, 
&st, final_destination);",
            sig_char => "S" },
     v => { as_proto => "void",
            return_type => "void *",

Modified: branches/pdd28str_part2/tools/dev/pbc_to_exe_gen.pl
==============================================================================
--- branches/pdd28str_part2/tools/dev/pbc_to_exe_gen.pl (original)
+++ branches/pdd28str_part2/tools/dev/pbc_to_exe_gen.pl Wed Jan 28 23:25:12 2009
@@ -257,7 +257,7 @@
     if (!interp)
         return 1;
 
-    Parrot_set_executable_name(interp, string_from_cstring(interp, argv[0], 
0));
+    Parrot_set_executable_name(interp, Parrot_str_new_from_cstring(interp, 
argv[0], 0));
     Parrot_set_flag(interp, PARROT_DESTROY_FLAG);
 
     pf = PackFile_new(interp, 0);

Reply via email to