Permalink
Browse files

[pdd28str] Merging the pdd27mmd branch into trunk for r36123 to r36318.

git-svn-id: https://svn.parrot.org/parrot/trunk@36319 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 2fdf5d0 commit b6bc0c34de1a13bd9cc3f6e418b2facedea74c2d @allisonrandal allisonrandal committed Feb 3, 2009
Showing with 1,659 additions and 1,744 deletions.
  1. +6 −6 compilers/imcc/imcc.y
  2. +6 −6 compilers/imcc/imcparser.c
  3. +4 −4 compilers/imcc/main.c
  4. +4 −4 compilers/imcc/optimizer.c
  5. +6 −6 compilers/imcc/parser_util.c
  6. +12 −12 compilers/imcc/pbc.c
  7. +5 −5 compilers/pirc/src/bcgen.c
  8. +2 −2 compilers/pirc/src/pir.l
  9. +11 −11 compilers/pirc/src/pircompunit.c
  10. +1 −1 compilers/pirc/src/piremit.c
  11. +2 −2 compilers/pirc/src/pirlexer.c
  12. +1 −1 config/gen/crypto/digest_pmc.in
  13. +3 −3 config/gen/platform/generic/exec.c
  14. +2 −2 config/gen/platform/generic/stat.c
  15. +4 −4 config/gen/platform/win32/exec.c
  16. +2 −2 config/gen/platform/win32/stat.c
  17. +3 −3 docs/debug.pod
  18. +3 −3 docs/dev/c_functions.pod
  19. +3 −3 docs/embed.pod
  20. +1 −1 docs/memory_internals.pod
  21. +1 −1 examples/compilers/japhc.c
  22. +4 −4 ext/Parrot-Embed/lib/Parrot/Embed.xs
  23. +120 −142 include/parrot/string_funcs.h
  24. +16 −16 languages/dotnet/pmc/dotnetassembly.pmc
  25. +2 −2 languages/dotnet/pmc/dotnetsignature.pmc
  26. +4 −4 languages/dotnet/pmc/managedpointer.pmc
  27. +13 −13 languages/lua/src/pmc/lua.pmc
  28. +4 −4 languages/lua/src/pmc/luaany.pmc
  29. +4 −4 languages/lua/src/pmc/luaboolean.pmc
  30. +31 −31 languages/lua/src/pmc/luabytecode.pmc
  31. +3 −3 languages/lua/src/pmc/luafunction.pmc
  32. +2 −2 languages/lua/src/pmc/luanil.pmc
  33. +19 −19 languages/lua/src/pmc/luanumber.pmc
  34. +47 −47 languages/lua/src/pmc/luastring.pmc
  35. +12 −12 languages/lua/src/pmc/luatable.pmc
  36. +3 −3 languages/lua/src/pmc/luathread.pmc
  37. +1 −1 languages/lua/src/pmc/luauserdata.pmc
  38. +6 −6 languages/pipp/src/pmc/php.pmc
  39. +20 −20 languages/pipp/src/pmc/phparray.pmc
  40. +4 −4 languages/pipp/src/pmc/phpboolean.pmc
  41. +3 −3 languages/pipp/src/pmc/phpfloat.pmc
  42. +2 −2 languages/pipp/src/pmc/phpinteger.pmc
  43. +1 −1 languages/pipp/src/pmc/phpnull.pmc
  44. +1 −1 languages/pipp/src/pmc/phpresource.pmc
  45. +8 −8 languages/pipp/src/pmc/phpstring.pmc
  46. +6 −6 languages/regex/pmc/match.pmc
  47. +4 −4 languages/regex/pmc/matchrange.pmc
  48. +8 −8 lib/Parrot/Pmc2c/Attribute.pm
  49. +2 −2 lib/Parrot/Pmc2c/Library.pm
  50. +3 −3 lib/Parrot/Pmc2c/PMCEmitter.pm
  51. +3 −3 src/datatypes.c
  52. +13 −13 src/debug.c
  53. +13 −13 src/dynext.c
  54. +2 −2 src/dynpmc/gdbmhash.pmc
  55. +6 −6 src/dynpmc/rational.pmc
  56. +2 −2 src/exceptions.c
  57. +14 −14 src/extend.c
  58. +1 −1 src/gc/api.c
  59. +1 −1 src/gc/generational_ms.c
  60. +1 −1 src/global_setup.c
  61. +2 −2 src/hash.c
  62. +7 −7 src/hll.c
  63. +8 −8 src/inter_call.c
  64. +1 −1 src/inter_cb.c
  65. +2 −2 src/inter_create.c
  66. +6 −6 src/inter_misc.c
  67. +4 −4 src/io/filehandle.c
  68. +2 −2 src/io/io_string.c
  69. +2 −2 src/io/portable.c
  70. +5 −5 src/io/socket_unix.c
  71. +2 −2 src/io/socket_win32.c
  72. +6 −6 src/io/unix.c
  73. +1 −1 src/io/utf8.c
  74. +2 −2 src/io/win32.c
  75. +5 −5 src/jit/i386/core.jit
  76. +2 −2 src/jit/i386/jit_defs.c
  77. +3 −3 src/jit/ppc/core.jit
  78. +15 −15 src/jit_debug.c
  79. +15 −15 src/jit_debug_xcoff.c
  80. +24 −24 src/key.c
  81. +43 −43 src/library.c
  82. +1 −1 src/list.c
  83. +1 −1 src/main.c
  84. +21 −21 src/multidispatch.c
  85. +11 −11 src/oo.c
  86. +8 −8 src/ops/bit.ops
  87. +16 −16 src/ops/cmp.ops
  88. +14 −14 src/ops/core.ops
  89. +1 −1 src/ops/experimental.ops
  90. +3 −3 src/ops/io.ops
  91. +8 −8 src/ops/set.ops
  92. +35 −35 src/ops/string.ops
  93. +2 −2 src/ops/sys.ops
  94. +6 −6 src/packdump.c
  95. +11 −11 src/packfile.c
  96. +1 −1 src/parrot_debugger.c
  97. +2 −2 src/pic.c
  98. +8 −8 src/pmc/bigint.pmc
  99. +1 −1 src/pmc/boolean.pmc
  100. +21 −21 src/pmc/class.pmc
  101. +1 −1 src/pmc/closure.pmc
  102. +29 −29 src/pmc/codestring.pmc
  103. +11 −11 src/pmc/complex.pmc
  104. +1 −1 src/pmc/coroutine.pmc
  105. +16 −16 src/pmc/cpointer.pmc
  106. +11 −11 src/pmc/default.pmc
  107. +19 −19 src/pmc/env.pmc
  108. +1 −1 src/pmc/eval.pmc
  109. +4 −4 src/pmc/eventhandler.pmc
  110. +36 −36 src/pmc/exception.pmc
  111. +1 −1 src/pmc/exporter.pmc
  112. +16 −16 src/pmc/file.pmc
  113. +12 −12 src/pmc/filehandle.pmc
  114. +3 −3 src/pmc/fixedbooleanarray.pmc
  115. +7 −7 src/pmc/fixedintegerarray.pmc
  116. +5 −5 src/pmc/fixedpmcarray.pmc
  117. +5 −5 src/pmc/fixedstringarray.pmc
  118. +2 −2 src/pmc/float.pmc
  119. +16 −16 src/pmc/hash.pmc
  120. +4 −4 src/pmc/integer.pmc
  121. +1 −1 src/pmc/iterator.pmc
  122. +1 −1 src/pmc/key.pmc
  123. +2 −2 src/pmc/lexinfo.pmc
  124. +5 −5 src/pmc/namespace.pmc
  125. +5 −5 src/pmc/nci.pmc
  126. +2 −2 src/pmc/object.pmc
  127. +30 −30 src/pmc/os.pmc
  128. +18 −18 src/pmc/packfile.pmc
  129. +2 −2 src/pmc/packfiledirectory.pmc
  130. +1 −1 src/pmc/packfilefixupentry.pmc
  131. +1 −1 src/pmc/packfilesegment.pmc
  132. +8 −8 src/pmc/parrotinterpreter.pmc
  133. +5 −5 src/pmc/pmcproxy.pmc
  134. +1 −1 src/pmc/resizablebooleanarray.pmc
  135. +3 −3 src/pmc/resizablepmcarray.pmc
  136. +1 −1 src/pmc/resizablestringarray.pmc
  137. +8 −8 src/pmc/role.pmc
  138. +7 −7 src/pmc/scalar.pmc
  139. +6 −6 src/pmc/scheduler.pmc
  140. +2 −2 src/pmc/slice.pmc
  141. +52 −52 src/pmc/string.pmc
  142. +30 −30 src/pmc/stringhandle.pmc
  143. +14 −14 src/pmc/sub.pmc
  144. +14 −14 src/pmc/task.pmc
  145. +1 −1 src/pmc/undef.pmc
  146. +1 −1 src/pmc/unmanagedstruct.pmc
  147. +5 −5 src/pmc_freeze.c
  148. +9 −9 src/scheduler.c
  149. +37 −37 src/spf_render.c
  150. +2 −2 src/spf_vtable.c
  151. +274 −337 src/string/api.c
  152. +2 −2 src/string/charset.c
  153. +3 −3 src/string/charset/ascii.c
  154. +7 −7 src/string/charset/iso-8859-1.c
  155. +2 −2 src/string/charset/unicode.c
  156. +2 −2 src/string/encoding.c
  157. +3 −3 src/string/encoding/fixed_8.c
  158. +1 −1 src/string/encoding/ucs2.c
  159. +3 −3 src/string/encoding/utf16.c
  160. +4 −4 src/string/encoding/utf8.c
  161. +1 −1 src/string/primitives.c
  162. +5 −5 src/sub.c
  163. +1 −1 src/thread.c
  164. +6 −6 src/trace.c
  165. +10 −10 t/src/compiler.t
  166. +7 −7 t/src/extend.t
  167. +3 −3 t/tools/dev/searchops/samples.pm
  168. +8 −8 t/tools/ops2pm/samples/bit_ops.original
  169. +6 −6 t/tools/ops2pm/samples/bit_ops.second
  170. +4 −4 t/tools/ops2pm/samples/core_ops.original
  171. +13 −13 tools/build/nativecall.pl
  172. +1 −1 tools/dev/pbc_to_exe_gen.pl
View
@@ -491,7 +491,7 @@ mk_pmc_const_named(PARROT_INTERP, ARGMOD(IMC_Unit *unit),
r[1] = rhs;
rhs->pmc_type = pmc_type(interp,
- string_from_cstring(interp, unquoted_name, name_length));
+ Parrot_str_new(interp, unquoted_name, name_length));
mem_sys_free(unquoted_name);
mem_sys_free(const_name);
@@ -797,7 +797,7 @@ static void
do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
{
ASSERT_ARGS(do_loadlib)
- STRING * const s = string_unescape_cstring(interp, lib + 1, '"', NULL);
+ STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
PMC *ignored = Parrot_load_lib(interp, s, NULL);
UNUSED(ignored);
Parrot_register_HLL_lib(interp, s);
@@ -968,7 +968,7 @@ hll_def:
HLL STRINGC
{
- STRING * const hll_name = string_unescape_cstring(interp, $2 + 1, '"', NULL);
+ STRING * const hll_name = Parrot_str_unescape(interp, $2 + 1, '"', NULL);
CONTEXT(interp)->current_HLL =
Parrot_register_HLL(interp, hll_name);
@@ -979,9 +979,9 @@ hll_def:
{
Parrot_Context *ctx = CONTEXT(interp);
STRING * const built_in_name =
- string_unescape_cstring(interp, $2 + 1, '"', NULL);
+ Parrot_str_unescape(interp, $2 + 1, '"', NULL);
STRING * const language_name =
- string_unescape_cstring(interp, $4 + 1, '"', NULL);
+ Parrot_str_unescape(interp, $4 + 1, '"', NULL);
int built_in_type = pmc_type(interp, built_in_name);
int language_type = pmc_type(interp, language_name);
@@ -1741,7 +1741,7 @@ classname:
/* 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(interp, $1, 0))) <= 0) {
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"Unknown PMC type '%s'\n", $1);
}
View
@@ -817,7 +817,7 @@ mk_pmc_const_named(PARROT_INTERP, ARGMOD(IMC_Unit *unit),
r[1] = rhs;
rhs->pmc_type = pmc_type(interp,
- string_from_cstring(interp, unquoted_name, name_length));
+ Parrot_str_new(interp, unquoted_name, name_length));
mem_sys_free(unquoted_name);
mem_sys_free(const_name);
@@ -1123,7 +1123,7 @@ static void
do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
{
ASSERT_ARGS(do_loadlib)
- STRING * const s = string_unescape_cstring(interp, lib + 1, '"', NULL);
+ STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
PMC *ignored = Parrot_load_lib(interp, s, NULL);
UNUSED(ignored);
Parrot_register_HLL_lib(interp, s);
@@ -3066,7 +3066,7 @@ int yynerrs;
case 18:
#line 970 "compilers/imcc/imcc.y"
{
- STRING * const hll_name = string_unescape_cstring(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
+ STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
CONTEXT(interp)->current_HLL =
Parrot_register_HLL(interp, hll_name);
@@ -3080,9 +3080,9 @@ int yynerrs;
{
Parrot_Context *ctx = CONTEXT(interp);
STRING * const built_in_name =
- string_unescape_cstring(interp, (yyvsp[(2) - (4)].s) + 1, '"', NULL);
+ Parrot_str_unescape(interp, (yyvsp[(2) - (4)].s) + 1, '"', NULL);
STRING * const language_name =
- string_unescape_cstring(interp, (yyvsp[(4) - (4)].s) + 1, '"', NULL);
+ Parrot_str_unescape(interp, (yyvsp[(4) - (4)].s) + 1, '"', NULL);
int built_in_type = pmc_type(interp, built_in_name);
int language_type = pmc_type(interp, language_name);
@@ -4151,7 +4151,7 @@ int yynerrs;
/* 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(interp, (yyvsp[(1) - (1)].s), 0))) <= 0) {
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));
}
View
@@ -991,23 +991,23 @@ compile_to_bytecode(PARROT_INTERP,
imc_compile_all_units(interp);
}
IMCC_CATCH(IMCC_FATAL_EXCEPTION) {
- char * const error_str = string_to_cstring(interp,
+ char * const error_str = Parrot_str_to_cstring(interp,
IMCC_INFO(interp)->error_message);
IMCC_INFO(interp)->error_code=IMCC_FATAL_EXCEPTION;
fprintf(stderr, "error:imcc:%s", error_str);
IMCC_print_inc(interp);
- string_cstring_free(error_str);
+ Parrot_str_free_cstring(error_str);
Parrot_exit(interp, IMCC_FATAL_EXCEPTION);
}
IMCC_CATCH(IMCC_FATALY_EXCEPTION) {
- char * const error_str = string_to_cstring(interp,
+ char * const error_str = Parrot_str_to_cstring(interp,
IMCC_INFO(interp)->error_message);
IMCC_INFO(interp)->error_code=IMCC_FATALY_EXCEPTION;
fprintf(stderr, "error:imcc:%s", error_str);
IMCC_print_inc(interp);
- string_cstring_free(error_str);
+ Parrot_str_free_cstring(error_str);
Parrot_exit(interp, IMCC_FATALY_EXCEPTION);
}
IMCC_END_TRY;
@@ -827,8 +827,8 @@ eval_ins(PARROT_INTERP, ARGIN(const char *op), size_t ops, ARGIN(SymReg **r))
break;
case 'N':
{
- STRING * const s = string_from_cstring(interp, r[i]->name, 0);
- REG_NUM(interp, i) = string_to_num(interp, s);
+ STRING * const s = Parrot_str_new(interp, r[i]->name, 0);
+ REG_NUM(interp, i) = Parrot_str_to_num(interp, s);
}
break;
case 'S':
@@ -1031,12 +1031,12 @@ IMCC_subst_constants(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *na
break;
case 'S':
{
- char * const name = string_to_cstring(interp, REG_STR(interp, 0));
+ char * const name = Parrot_str_to_cstring(interp, REG_STR(interp, 0));
r[1] = mk_const(interp, name, r[0]->set);
snprintf(b, sizeof (b), "%p", REG_STR(interp, 0));
- string_cstring_free(name);
+ Parrot_str_free_cstring(name);
break;
}
@@ -152,7 +152,7 @@ iNEW(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGMOD(SymReg *r0),
SymReg *pmc;
int nargs;
const int pmc_num = pmc_type(interp,
- string_from_cstring(interp, *type == '.' ? type + 1 : type, 0));
+ Parrot_str_new(interp, *type == '.' ? type + 1 : type, 0));
snprintf(fmt, sizeof (fmt), "%d", pmc_num);
pmc = mk_const(interp, fmt, 'I');
@@ -698,7 +698,7 @@ imcc_compile(PARROT_INTERP, ARGIN(const char *s), int pasm_file,
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(interp, name, 0);
*error_message = NULL;
}
@@ -934,7 +934,7 @@ imcc_compile_file(PARROT_INTERP, ARGIN(const char *fullname),
IMCC_INFO(interp)->line = 1;
/*
- * the string_compare() called from pmc_type() triggers DOD
+ * the Parrot_str_compare() called from pmc_type() triggers DOD
* which can destroy packfiles under construction
*/
Parrot_block_GC_mark(interp);
@@ -1041,13 +1041,13 @@ void
register_compilers(PARROT_INTERP)
{
ASSERT_ARGS(register_compilers)
- Parrot_compreg(interp, const_string(interp, "PASM"), imcc_compile_pasm_ex);
- Parrot_compreg(interp, const_string(interp, "PIR"), imcc_compile_pir_ex);
+ Parrot_compreg(interp, Parrot_str_new_constant(interp, "PASM"), imcc_compile_pasm_ex);
+ Parrot_compreg(interp, Parrot_str_new_constant(interp, "PIR"), imcc_compile_pir_ex);
/* It looks like this isn't used anywhere yet */
/* TODO: return a Eval PMC, instead of a packfile */
/* Parrot_compreg(interp,
- const_string(interp, "FILE"),
+ Parrot_str_new_constant(interp, "FILE"),
imcc_compile_file ); */
}
View
@@ -957,15 +957,15 @@ IMCC_string_from_reg(PARROT_INTERP, ARGIN(const SymReg *r))
/* past delim */
buf = p + 1;
- s = string_unescape_cstring(interp, buf, '"', charset);
+ s = Parrot_str_unescape(interp, buf, '"', charset);
/* restore colon, as we may reuse this string */
p[-1] = ':';
return s;
}
else if (*buf == '"') {
buf++;
- return string_unescape_cstring(interp, buf, '"', NULL);
+ return Parrot_str_unescape(interp, buf, '"', NULL);
}
else if (*buf == '\'') { /* TODO handle python raw strings */
buf++;
@@ -999,15 +999,15 @@ IMCC_string_from__STRINGC(PARROT_INTERP, ARGIN(const char *buf))
/* past delim */
buf = p + 1;
- s = string_unescape_cstring(interp, buf, '"', charset);
+ s = Parrot_str_unescape(interp, buf, '"', charset);
/* restore colon, as we may reuse this string */
p[-1] = ':';
return s;
}
else if (*buf == '"') {
buf++;
- return string_unescape_cstring(interp, buf, '"', NULL);
+ return Parrot_str_unescape(interp, buf, '"', NULL);
}
else if (*buf == '\'') {
buf++;
@@ -1060,10 +1060,10 @@ add_const_num(PARROT_INTERP, ARGIN_NULLOK(const char *buf))
{
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(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);
+ interp->code->const_table->constants[k]->u.number = Parrot_str_to_num(interp, s);
return k;
}
@@ -1323,7 +1323,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
/* 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(interp,
unit->instance_of + 1, strlen(unit->instance_of) - 2);
PMC * const classobj = Parrot_oo_get_class_str(interp, classname);
@@ -1420,7 +1420,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
/* 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(interp, unit->vtable_name + 1,
strlen(unit->vtable_name) - 2);
UNIT_FREE_CHAR(unit->method_name);
}
@@ -1450,7 +1450,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
sub->method_name = sub->name;
}
else
- sub->method_name = string_from_cstring(interp, "", 0);
+ sub->method_name = Parrot_str_new(interp, "", 0);
if (unit->has_ns_entry_name == 1) {
@@ -1773,13 +1773,13 @@ make_pmc_const(PARROT_INTERP, ARGMOD(SymReg *r))
PMC *p;
if (*r->name == '"')
- s = string_unescape_cstring(interp, r->name + 1, '"', NULL);
+ s = Parrot_str_unescape(interp, r->name + 1, '"', NULL);
else if (*r->name == '\'')
- s = string_unescape_cstring(interp, r->name + 1, '\'', NULL);
+ s = Parrot_str_unescape(interp, r->name + 1, '\'', NULL);
else
- s = string_unescape_cstring(interp, r->name, 0, NULL);
+ s = Parrot_str_unescape(interp, r->name, 0, NULL);
p = VTABLE_instantiate_str(interp, _class, s, PObj_constant_FLAG);
View
@@ -190,7 +190,7 @@ add_string_const(bytecode * const bc, char const * const str, char const * chars
while (index < count) {
constant = bc->interp->code->const_table->constants[index];
if (constant->type == PFC_STRING) {
- if (string_equal(bc->interp, constant->u.string, parrotstr) == 0) {
+ if (Parrot_str_equal(bc->interp, constant->u.string, parrotstr) == 0) {
#if DEBUGBC
fprintf(stderr, "found string %s at index %d\n", str, index);
#endif
@@ -268,7 +268,7 @@ add_key_const(bytecode * const bc, PMC *key) {
if (constant->type == PFC_KEY) {
STRING *s2 = key_set_to_string(bc->interp, constant->u.key);
- if (string_equal(bc->interp, s1, s2) == 0) {
+ if (Parrot_str_equal(bc->interp, s1, s2) == 0) {
#if DEBUGBC
fprintf(stderr, "found equal key (%d)\n", index);
#endif
@@ -749,7 +749,7 @@ create_lexinfo(bytecode * const bc, PMC * sub, lexical * const lexicals, int nee
/* 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(bc->interp, lexiter->name, strlen(lexiter->name));
/* declare the .lex as such */
@@ -838,7 +838,7 @@ find_outer_sub(bytecode * const bc, char const * const outername, struct lexer_s
cur_name = PMC_sub(current)->name;
- /* XXX can't this be a call to string_compare() ? */
+ /* XXX can't this be a call to Parrot_str_compare() ? */
if (cur_name->strlen == len && (memcmp((char *)cur_name->strstart, outername, len) == 0))
return current;
@@ -900,7 +900,7 @@ create_sub_pmc(bytecode * const bc, int iscoroutine, char const * const instance
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(bc->interp, instanceof + 1, strlen(instanceof) - 2);
PMC * const classobj = Parrot_oo_get_class_str(bc->interp, classname);
View
@@ -411,10 +411,10 @@ REGISTER "$"[SNIP]{DIGITS}
*/
lexer_state * const lexer = yyget_extra(yyscanner);
- STRING *pstr = string_unescape_cstring(lexer->interp,
+ STRING *pstr = Parrot_str_unescape(lexer->interp,
yytext + 1, '"', "ascii");
- char *str = string_to_cstring(lexer->interp, pstr);
+ char *str = Parrot_str_to_cstring(lexer->interp, pstr);
yylval->sval = str;
return TK_STRINGC;
Oops, something went wrong.

0 comments on commit b6bc0c3

Please sign in to comment.