[svn:parrot] r36310 - in branches/pdd28str_part2: compilers/imcc config/gen/platform/generic config/gen/platform/win32 include/parrot languages/lua/src/pmc languages/pipp/src/pmc src src/dynpmc src/gc src/io src/jit/i386 src/ops src/pmc src/string t/tools/dev/searchops t/tools/ops2pm/samples tools/build
allison at svn.parrot.org
allison at svn.parrot.org
Tue Feb 3 01:16:18 UTC 2009
Author: allison
Date: Tue Feb 3 01:16:16 2009
New Revision: 36310
URL: https://trac.parrot.org/parrot/changeset/36310
Log:
[pdd28str] Renaming memory-related string functions.
Modified:
branches/pdd28str_part2/compilers/imcc/main.c
branches/pdd28str_part2/compilers/imcc/optimizer.c
branches/pdd28str_part2/config/gen/platform/generic/stat.c
branches/pdd28str_part2/config/gen/platform/win32/exec.c
branches/pdd28str_part2/config/gen/platform/win32/stat.c
branches/pdd28str_part2/include/parrot/string_funcs.h
branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc
branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
branches/pdd28str_part2/languages/pipp/src/pmc/phpstring.pmc
branches/pdd28str_part2/src/datatypes.c
branches/pdd28str_part2/src/debug.c
branches/pdd28str_part2/src/dynext.c
branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc
branches/pdd28str_part2/src/dynpmc/rational.pmc
branches/pdd28str_part2/src/extend.c
branches/pdd28str_part2/src/gc/api.c
branches/pdd28str_part2/src/gc/generational_ms.c
branches/pdd28str_part2/src/hll.c
branches/pdd28str_part2/src/inter_call.c
branches/pdd28str_part2/src/io/portable.c
branches/pdd28str_part2/src/io/socket_unix.c
branches/pdd28str_part2/src/io/socket_win32.c
branches/pdd28str_part2/src/io/unix.c
branches/pdd28str_part2/src/io/win32.c
branches/pdd28str_part2/src/jit/i386/jit_defs.c
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/oo.c
branches/pdd28str_part2/src/ops/core.ops
branches/pdd28str_part2/src/ops/string.ops
branches/pdd28str_part2/src/packfile.c
branches/pdd28str_part2/src/pmc/bigint.pmc
branches/pdd28str_part2/src/pmc/class.pmc
branches/pdd28str_part2/src/pmc/complex.pmc
branches/pdd28str_part2/src/pmc/env.pmc
branches/pdd28str_part2/src/pmc/file.pmc
branches/pdd28str_part2/src/pmc/fixedintegerarray.pmc
branches/pdd28str_part2/src/pmc/nci.pmc
branches/pdd28str_part2/src/pmc/os.pmc
branches/pdd28str_part2/src/pmc/sub.pmc
branches/pdd28str_part2/src/spf_render.c
branches/pdd28str_part2/src/string/api.c
branches/pdd28str_part2/t/tools/dev/searchops/samples.pm
branches/pdd28str_part2/t/tools/ops2pm/samples/core_ops.original
branches/pdd28str_part2/tools/build/nativecall.pl
Modified: branches/pdd28str_part2/compilers/imcc/main.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/main.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/compilers/imcc/main.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -997,7 +997,7 @@
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) {
@@ -1007,7 +1007,7 @@
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;
Modified: branches/pdd28str_part2/compilers/imcc/optimizer.c
==============================================================================
--- branches/pdd28str_part2/compilers/imcc/optimizer.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/compilers/imcc/optimizer.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -1035,7 +1035,7 @@
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;
}
Modified: branches/pdd28str_part2/config/gen/platform/generic/stat.c
==============================================================================
--- branches/pdd28str_part2/config/gen/platform/generic/stat.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/config/gen/platform/generic/stat.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -164,7 +164,7 @@
/* Everything needs the result of stat, so just go do it */
const int status = stat(filename, &statbuf);
- string_cstring_free(filename);
+ Parrot_str_free_cstring(filename);
return stat_common(interp, &statbuf, thing, status);
}
Modified: branches/pdd28str_part2/config/gen/platform/win32/exec.c
==============================================================================
--- branches/pdd28str_part2/config/gen/platform/win32/exec.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/config/gen/platform/win32/exec.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -49,7 +49,7 @@
strcpy(cmd, "/c ");
strcat(cmd, cmdin);
- string_cstring_free(cmdin);
+ Parrot_str_free_cstring(cmdin);
memset(&si, 0, sizeof (si));
si.cb = sizeof (si);
Modified: branches/pdd28str_part2/config/gen/platform/win32/stat.c
==============================================================================
--- branches/pdd28str_part2/config/gen/platform/win32/stat.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/config/gen/platform/win32/stat.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -178,7 +178,7 @@
/* Everything needs the result of stat, so just go do it */
const int status = stat(filename, &statbuf);
- string_cstring_free(filename);
+ Parrot_str_free_cstring(filename);
return stat_common(interp, &statbuf, thing, status);
}
Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h Tue Feb 3 01:16:16 2009 (r36310)
@@ -238,7 +238,7 @@
FUNC_MODIFIES(*s);
PARROT_EXPORT
-void string_cstring_free(ARGIN_NULLOK(char *p));
+void Parrot_str_free_cstring(ARGIN_NULLOK(char *p));
PARROT_EXPORT
void Parrot_str_finish(PARROT_INTERP)
@@ -380,7 +380,7 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-void string_pin(PARROT_INTERP, ARGMOD(STRING *s))
+void Parrot_str_pin(PARROT_INTERP, ARGMOD(STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*s);
@@ -506,7 +506,7 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-void string_unpin(PARROT_INTERP, ARGMOD(STRING *s))
+void Parrot_str_unpin(PARROT_INTERP, ARGMOD(STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*s);
@@ -532,7 +532,7 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*tc);
-void string_free(PARROT_INTERP, ARGIN(STRING *s))
+void Parrot_str_free(PARROT_INTERP, ARGIN(STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -611,7 +611,7 @@
#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
+#define ASSERT_ARGS_Parrot_str_free_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
#define ASSERT_ARGS_Parrot_str_finish __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_string_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -662,7 +662,7 @@
PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_string_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_string_pin __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_pin __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_string_primary_encoding_for_representation \
@@ -711,7 +711,7 @@
#define ASSERT_ARGS_Parrot_str_unescape __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(cstring)
-#define ASSERT_ARGS_string_unpin __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_unpin __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_string_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -721,7 +721,7 @@
#define ASSERT_ARGS_Parrot_str_from_int_base __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(tc)
-#define ASSERT_ARGS_string_free __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_free __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(s)
#define ASSERT_ARGS_Parrot_str_from_uint __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/languages/lua/src/pmc/lua.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -180,7 +180,7 @@
{ /* Limit s scope and lifetime */
char *s = Parrot_str_to_cstring(INTERP, fmt);
reslen = strftime(b, sizeof b, s, &stm);
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
}
retval = Parrot_str_new(INTERP, b, reslen);
Modified: branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -1039,12 +1039,12 @@
if (*s2 == '\0') {
retval = pmc_new(INTERP, dynpmc_LuaNumber);
VTABLE_set_number_native(INTERP, retval, d);
- string_cstring_free(s1);
+ Parrot_str_free_cstring(s1);
RETURN(PMC *retval);
}
}
retval = pmc_new(INTERP, dynpmc_LuaNil);
- string_cstring_free(s1);
+ Parrot_str_free_cstring(s1);
RETURN(PMC *retval);
}
@@ -1073,12 +1073,12 @@
if (*s2 == '\0') {
retval = pmc_new(INTERP, dynpmc_LuaNumber);
VTABLE_set_number_native(INTERP, retval, n);
- string_cstring_free(s1);
+ Parrot_str_free_cstring(s1);
RETURN(PMC *retval);
}
}
retval = pmc_new(INTERP, dynpmc_LuaNil);
- string_cstring_free(s1);
+ Parrot_str_free_cstring(s1);
RETURN(PMC *retval);
}
Modified: branches/pdd28str_part2/languages/pipp/src/pmc/phpstring.pmc
==============================================================================
--- branches/pdd28str_part2/languages/pipp/src/pmc/phpstring.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/languages/pipp/src/pmc/phpstring.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -93,7 +93,7 @@
}
}
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
RETURN(INTVAL retval);
}
@@ -113,7 +113,7 @@
retval = pmc_new(INTERP, dynpmc_PhpInteger);
VTABLE_set_integer_native(INTERP, retval, n);
- string_cstring_free(s1);
+ Parrot_str_free_cstring(s1);
RETURN(PMC *retval);
}
@@ -158,7 +158,7 @@
}
}
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
RETURN(PMC *retval);
}
Modified: branches/pdd28str_part2/src/datatypes.c
==============================================================================
--- branches/pdd28str_part2/src/datatypes.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/datatypes.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -46,12 +46,12 @@
for (i = enum_first_type; i < enum_last_type; i++) {
if (STREQ(data_types[i - enum_first_type].name, type)) {
- string_cstring_free(type);
+ Parrot_str_free_cstring(type);
return i;
}
}
- string_cstring_free(type);
+ Parrot_str_free_cstring(type);
return enum_type_undef;
}
Modified: branches/pdd28str_part2/src/debug.c
==============================================================================
--- branches/pdd28str_part2/src/debug.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/debug.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -1226,7 +1226,7 @@
file = Parrot_str_to_cstring(interp, filename);
PDB_load_source(interp, file);
- string_cstring_free(file);
+ Parrot_str_free_cstring(file);
}
/*
@@ -2762,7 +2762,7 @@
{
char * const temp = Parrot_str_to_cstring(interp, PMC_str_val(k));
strcpy(&dest[size], temp);
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
size += Parrot_str_byte_length(interp, PMC_str_val(k));
dest[size++] = '"';
Modified: branches/pdd28str_part2/src/dynext.c
==============================================================================
--- branches/pdd28str_part2/src/dynext.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/dynext.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -397,12 +397,12 @@
/* get load_func */
load_func = (PMC * (*)(PARROT_INTERP))
D2FPTR(Parrot_dlsym(handle, cload_func_name));
- string_cstring_free(cload_func_name);
+ Parrot_str_free_cstring(cload_func_name);
/* get init_func */
init_func = (void (*)(PARROT_INTERP, PMC *))
D2FPTR(Parrot_dlsym(handle, cinit_func_name));
- string_cstring_free(cinit_func_name);
+ Parrot_str_free_cstring(cinit_func_name);
}
else {
load_func = NULL;
@@ -457,7 +457,7 @@
Parrot_str_new_init(d, raw_str, strlen(raw_str),
PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
PObj_constant_FLAG);
- string_cstring_free(raw_str);
+ Parrot_str_free_cstring(raw_str);
return ret;
}
Modified: branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/dynpmc/gdbmhash.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -119,7 +119,7 @@
char * const c_db_name = string_to_cstring(interp, value);
GDBM_FILE dbf = gdbm_open(c_db_name, 0, GDBM_NEWDB, 0666, 0);
- string_cstring_free(c_db_name);
+ Parrot_str_free_cstring(c_db_name);
PMC_struct_val(SELF) = dbf;
}
Modified: branches/pdd28str_part2/src/dynpmc/rational.pmc
==============================================================================
--- branches/pdd28str_part2/src/dynpmc/rational.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/dynpmc/rational.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -56,7 +56,7 @@
#ifdef PARROT_HAS_GMP
char * const cstr = mpq_get_str(NULL, (int) base, RT(self));
STRING * pstr = Parrot_str_new(interp, cstr, 0);
- string_cstring_free(cstr);
+ Parrot_str_free_cstring(cstr);
return pstr;
#else
RAISE_EXCEPTION
@@ -393,7 +393,7 @@
char * const cstr = string_to_cstring(INTERP, value);
mpq_set_str(RT(SELF), cstr, 0);
mpq_canonicalize(RT(SELF));
- string_cstring_free(cstr);
+ Parrot_str_free_cstring(cstr);
#else
RAISE_EXCEPTION
#endif
@@ -411,7 +411,7 @@
char * const cstr = string_to_cstring(INTERP, value);
mpq_set_str(RT(SELF), cstr, (int) base);
mpq_canonicalize(RT(SELF));
- string_cstring_free(cstr);
+ Parrot_str_free_cstring(cstr);
#else
RAISE_EXCEPTION
#endif
Modified: branches/pdd28str_part2/src/extend.c
==============================================================================
--- branches/pdd28str_part2/src/extend.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/extend.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -357,7 +357,7 @@
Return a null-terminated string that represents the string value of the PMC.
-Note that you must free this string with C<string_cstring_free()>!
+Note that you must free this string with C<Parrot_str_free_cstring()>!
=cut
@@ -388,7 +388,7 @@
Return a null-terminated string that represents the string value of the PMC.
-Note that you must free this string with C<string_cstring_free()>!
+Note that you must free this string with C<Parrot_str_free_cstring()>!
=cut
@@ -421,7 +421,7 @@
Yes, right now this is a bit of a cheat. It needs fixing, but without
disturbing the interface.
-Note that you must free the string with C<string_cstring_free()>.
+Note that you must free the string with C<Parrot_str_free_cstring()>.
=cut
@@ -454,7 +454,7 @@
Yes, right now this is a bit of a cheat. It needs fixing, but without
disturbing the interface.
-Note that you must free this string with C<string_cstring_free()>.
+Note that you must free this string with C<Parrot_str_free_cstring()>.
=cut
@@ -893,7 +893,7 @@
Parrot_free_cstring(ARGIN_NULLOK(char *string))
{
ASSERT_ARGS(Parrot_free_cstring)
- string_cstring_free(string);
+ Parrot_str_free_cstring(string);
}
/*
Modified: branches/pdd28str_part2/src/gc/api.c
==============================================================================
--- branches/pdd28str_part2/src/gc/api.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/gc/api.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -357,7 +357,7 @@
ARGMOD(PObj *b))
{
ASSERT_ARGS(Parrot_gc_free_sysmem)
- /* has sysmem allocated, e.g. string_pin */
+ /* has sysmem allocated, e.g. Parrot_str_pin */
if (PObj_sysmem_TEST(b) && PObj_bufstart(b))
mem_sys_free(PObj_bufstart(b));
Modified: branches/pdd28str_part2/src/gc/generational_ms.c
==============================================================================
--- branches/pdd28str_part2/src/gc/generational_ms.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/gc/generational_ms.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -1713,7 +1713,7 @@
* this is ugly, we still have to sweep all buffers
*/
if (PObj_sysmem_TEST(obj) && PObj_bufstart(obj)) {
- /* has sysmem allocated, e.g. string_pin */
+ /* has sysmem allocated, e.g. Parrot_str_pin */
mem_sys_free(PObj_bufstart(obj));
PObj_bufstart(obj) = NULL;
PObj_buflen(obj) = 0;
Modified: branches/pdd28str_part2/src/hll.c
==============================================================================
--- branches/pdd28str_part2/src/hll.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/hll.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -101,7 +101,7 @@
len, PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
PObj_constant_FLAG);
- string_cstring_free(cstring);
+ Parrot_str_free_cstring(cstring);
VTABLE_set_pmc_keyed_str(interp, hll_info, const_name, entry);
}
else
Modified: branches/pdd28str_part2/src/inter_call.c
==============================================================================
--- branches/pdd28str_part2/src/inter_call.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/inter_call.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -2891,7 +2891,7 @@
interp->current_args = save_current_args;
interp->args_signature = save_args_signature;
interp->current_object = save_current_object;
- string_cstring_free(signature);
+ Parrot_str_free_cstring(signature);
}
Modified: branches/pdd28str_part2/src/io/portable.c
==============================================================================
--- branches/pdd28str_part2/src/io/portable.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/io/portable.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -152,7 +152,7 @@
if (fptr == NULL && errno == ENOENT && (flags & PIO_F_WRITE))
fptr = fopen(spath, "w+b");
- string_cstring_free(spath);
+ Parrot_str_free_cstring(spath);
}
/* File open */
Modified: branches/pdd28str_part2/src/io/socket_unix.c
==============================================================================
--- branches/pdd28str_part2/src/io/socket_unix.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/io/socket_unix.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -99,12 +99,12 @@
/* XXX FIXME - Handle error condition better */
if (!he) {
fprintf(stderr, "gethostbyname failure [%s]\n", s);
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
return NULL;
}
memcpy((char*)&sa.sin_addr, he->h_addr, sizeof (sa.sin_addr));
}
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
sa.sin_family = family;
sa.sin_port = htons(port);
Modified: branches/pdd28str_part2/src/io/socket_win32.c
==============================================================================
--- branches/pdd28str_part2/src/io/socket_win32.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/io/socket_win32.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -349,7 +349,7 @@
* it may have been toggled off.
*/
he = gethostbyname(s);
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
/* XXX FIXME - Handle error condition better */
if (!he) {
Modified: branches/pdd28str_part2/src/io/unix.c
==============================================================================
--- branches/pdd28str_part2/src/io/unix.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/io/unix.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -175,7 +175,7 @@
*/
if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
close(fd);
- string_cstring_free(spath); /* returning before C string freed */
+ Parrot_str_free_cstring(spath); /* returning before C string freed */
return PMCNULL;
}
/*
@@ -206,7 +206,7 @@
/* File doesn't exist and O_CREAT not specified */
}
- string_cstring_free(spath); /* done with C string */
+ Parrot_str_free_cstring(spath); /* done with C string */
if (fd >= 0) {
struct stat buf;
@@ -703,11 +703,11 @@
argv[n] = NULL;
- string_cstring_free(c); /* done with C string */
+ Parrot_str_free_cstring(c); /* done with C string */
execv(cmd, argv); /* XXX use execvp ? */
/* Will never reach this unless exec fails. */
- string_cstring_free(orig_cmd);
+ Parrot_str_free_cstring(orig_cmd);
perror("execvp");
exit(EXIT_FAILURE);
}
Modified: branches/pdd28str_part2/src/io/win32.c
==============================================================================
--- branches/pdd28str_part2/src/io/win32.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/io/win32.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -227,7 +227,7 @@
char * const spath = Parrot_str_to_cstring(interp, path);
fd = CreateFile(spath, fAcc, fShare, NULL, fCreat,
FILE_ATTRIBUTE_NORMAL, NULL);
- string_cstring_free(spath);
+ Parrot_str_free_cstring(spath);
}
if (fd != INVALID_HANDLE_VALUE) {
PMC *io;
Modified: branches/pdd28str_part2/src/jit/i386/jit_defs.c
==============================================================================
--- branches/pdd28str_part2/src/jit/i386/jit_defs.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/jit/i386/jit_defs.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -2610,7 +2610,7 @@
for (i=0; i<string_buffer_count; i++) {
emitm_movl_m_r(interp, pc, emit_EAX, emit_EBP, 0, 1, strings_offset);
emitm_movl_r_m(interp, pc, emit_EAX, emit_EBP, 0, 1, temp_calls_offset + 0);
- emitm_call_cfunc(pc, string_cstring_free);
+ emitm_call_cfunc(pc, Parrot_str_free_cstring);
strings_offset += 4;
}
Modified: branches/pdd28str_part2/src/jit_debug.c
==============================================================================
--- branches/pdd28str_part2/src/jit_debug.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/jit_debug.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -300,7 +300,7 @@
file = Parrot_str_append(interp, file,
string_make(interp, ".", 1, NULL, PObj_external_FLAG));
- string_cstring_free(src);
+ Parrot_str_free_cstring(src);
}
else {
/* chop pbc */
@@ -312,7 +312,7 @@
{
char *const temp = Parrot_str_to_cstring(interp, stabsfile);
stabs = fopen(temp, "w");
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
if (stabs == NULL)
return;
@@ -322,7 +322,7 @@
/* filename info */
fprintf(stabs, ".data\n.text\n"); /* darwin wants it */
fprintf(stabs, ".stabs \"%s\"," N_SO ",0,0,0\n", temp);
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
/* jit_func start addr */
fprintf(stabs, ".stabs \"jit_func:F(0,1)\"," N_FUN ",0,1,%p\n",
@@ -368,7 +368,7 @@
int status = system(temp);
if (status)
fprintf(stderr, "Assembly failed: %d\n%s\n", status, temp);
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
}
Modified: branches/pdd28str_part2/src/jit_debug_xcoff.c
==============================================================================
--- branches/pdd28str_part2/src/jit_debug_xcoff.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/jit_debug_xcoff.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -270,7 +270,7 @@
else if (!ext) /* EVAL_n */
file = Parrot_str_append(interp, file,
string_make(interp, ".", 1, NULL, PObj_external_FLAG));
- string_cstring_free(src);
+ Parrot_str_free_cstring(src);
}
else {
/* chop pbc */
@@ -282,7 +282,7 @@
{
char * const temp = Parrot_str_to_cstring(interp, stabsfile);
stabs = fopen(temp, "w");
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
if (stabs == NULL)
return;
@@ -291,7 +291,7 @@
char * const temp = Parrot_str_to_cstring(interp, pasmfile);
/* filename info */
fprintf(stabs, ".file \"%s\"\n", temp);
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
/* declare function name */
fprintf(stabs, ".jit_func:\n");
@@ -336,7 +336,7 @@
{
char * const temp = Parrot_str_to_cstring(interp, cmd);
system(temp);
- string_cstring_free(temp);
+ Parrot_str_free_cstring(temp);
}
}
Modified: branches/pdd28str_part2/src/library.c
==============================================================================
--- branches/pdd28str_part2/src/library.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/library.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -603,7 +603,7 @@
Locate the full path for C<file_name> and the given file type(s). If
successful, returns a C-string allocated with C<Parrot_str_to_cstring> or
-NULL otherwise. Remember to free the string with C<string_cstring_free()>.
+NULL otherwise. Remember to free the string with C<Parrot_str_free_cstring()>.
=item C<STRING* Parrot_locate_runtime_file_str>
Modified: branches/pdd28str_part2/src/oo.c
==============================================================================
--- branches/pdd28str_part2/src/oo.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/oo.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -419,7 +419,7 @@
const INTVAL cmp = strcmp(name_c, meth_c);
if (cmp == 0) {
- string_cstring_free(name_c);
+ Parrot_str_free_cstring(name_c);
return mid;
}
else if (cmp > 0)
@@ -428,7 +428,7 @@
high = mid;
}
- string_cstring_free(name_c);
+ Parrot_str_free_cstring(name_c);
return -1;
}
Modified: branches/pdd28str_part2/src/ops/core.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/core.ops Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/ops/core.ops Tue Feb 3 01:16:16 2009 (r36310)
@@ -189,7 +189,7 @@
{
char * const label = Parrot_str_to_cstring(interp, $1);
fe = PackFile_find_fixup_entry(interp, enum_fixup_label, label);
- string_cstring_free(label);
+ Parrot_str_free_cstring(label);
}
if (!fe) {
@@ -1351,7 +1351,7 @@
VTABLE_set_pointer_keyed_str(interp, $1, $4, F2DPTR(p));
PObj_get_FLAGS($1) |= PObj_private1_FLAG;
}
- string_cstring_free(name);
+ Parrot_str_free_cstring(name);
}
op dlvar(out PMC, invar PMC, in STR) {
@@ -1369,7 +1369,7 @@
$1 = pmc_new(interp, enum_class_UnManagedStruct);
PMC_data($1) = p;
}
- string_cstring_free(name);
+ Parrot_str_free_cstring(name);
}
inline op compreg(in STR, invar PMC) {
Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/ops/string.ops Tue Feb 3 01:16:16 2009 (r36310)
@@ -211,7 +211,7 @@
=cut
op pin(inout STR) :base_mem {
- string_pin(interp, $1);
+ Parrot_str_pin(interp, $1);
}
@@ -223,7 +223,7 @@
=cut
op unpin(inout STR) :base_mem {
- string_unpin(interp, $1);
+ Parrot_str_unpin(interp, $1);
}
Modified: branches/pdd28str_part2/src/packfile.c
==============================================================================
--- branches/pdd28str_part2/src/packfile.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/packfile.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -2605,7 +2605,7 @@
Parrot_io_printf(interp, " OFFSET => %d,\n",
debug->mappings[i]->offset);
Parrot_io_printf(interp, " FILENAME => %s\n", filename);
- string_cstring_free(filename);
+ Parrot_str_free_cstring(filename);
Parrot_io_printf(interp, " ],\n");
}
@@ -4077,7 +4077,7 @@
self->keys[i]->type == PF_ANNOTATION_KEY_TYPE_NUM ? "number" :
"PMC");
Parrot_io_printf(interp, " ],\n");
- string_cstring_free(key_name);
+ Parrot_str_free_cstring(key_name);
}
Parrot_io_printf(interp, " ],\n");
@@ -4436,7 +4436,7 @@
filename = Parrot_str_to_cstring(interp, path);
if (file_type == PARROT_RUNTIME_FT_PBC) {
PackFile *pf = PackFile_append_pbc(interp, filename);
- string_cstring_free(filename);
+ Parrot_str_free_cstring(filename);
if (!pf)
Parrot_ex_throw_from_c_args(interp, NULL, 1,
@@ -4447,7 +4447,7 @@
PackFile_ByteCode * const cs =
(PackFile_ByteCode *)IMCC_compile_file_s(interp,
filename, &err);
- string_cstring_free(filename);
+ Parrot_str_free_cstring(filename);
if (cs)
do_sub_pragmas(interp, cs, PBC_LOADED, NULL);
Modified: branches/pdd28str_part2/src/pmc/bigint.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/bigint.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/bigint.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -694,13 +694,13 @@
VTABLE void set_string_native(STRING *value) {
char * const s = Parrot_str_to_cstring(INTERP, value);
bigint_set_str(INTERP, SELF, s, 10);
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
}
VTABLE void set_string_keyed_int(INTVAL base, STRING *value) {
char * const s = Parrot_str_to_cstring(INTERP, value);
bigint_set_str(INTERP, SELF, s, base);
- string_cstring_free(s);
+ Parrot_str_free_cstring(s);
}
/*
Modified: branches/pdd28str_part2/src/pmc/class.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/class.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/class.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -1198,9 +1198,9 @@
/* Check if the passed name is the same as the stored short name. */
INTVAL name_match = Parrot_str_equal(interp, classname, self_name) == 0;
- string_free(interp, classname);
+ Parrot_str_free(interp, classname);
if (is_proxy)
- string_free(interp, self_name);
+ Parrot_str_free(interp, self_name);
if (name_match)
return 1;
Modified: branches/pdd28str_part2/src/pmc/complex.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/complex.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/complex.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -152,7 +152,7 @@
}
else {
/* "+" or "-" not found: error */
- string_cstring_free(str);
+ Parrot_str_free_cstring(str);
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_STRING_REPRESENTATION,
@@ -191,7 +191,7 @@
if (second_num_minus)
*im = -*im;
- string_cstring_free(str);
+ Parrot_str_free_cstring(str);
}
static void
Modified: branches/pdd28str_part2/src/pmc/env.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/env.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/env.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -163,7 +163,7 @@
if (keyname) {
int free_it = 0;
char * const val = Parrot_getenv(keyname, &free_it);
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
if (val) {
STRING * const retval = Parrot_str_new(interp, val, 0);
@@ -201,7 +201,7 @@
if (keyname) {
int free_it = 0;
val = Parrot_getenv(keyname, &free_it);
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
if (val) {
retval = Parrot_str_new(INTERP, val, 0);
@@ -238,10 +238,10 @@
Parrot_setenv(keyname, env_val);
if (keyname)
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
if (env_val)
- string_cstring_free(env_val);
+ Parrot_str_free_cstring(env_val);
}
/*
@@ -265,10 +265,10 @@
Parrot_setenv(keyname, env_val);
if (keyname)
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
if (env_val)
- string_cstring_free(env_val);
+ Parrot_str_free_cstring(env_val);
}
/*
@@ -288,7 +288,7 @@
if (keyname) {
int free_it;
char * const val = Parrot_getenv(keyname, &free_it);
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
if (val) {
if (free_it)
@@ -325,7 +325,7 @@
Parrot_unsetenv(keyname);
}
- string_cstring_free(keyname);
+ Parrot_str_free_cstring(keyname);
}
}
}
Modified: branches/pdd28str_part2/src/pmc/file.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/file.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/file.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -71,7 +71,7 @@
#else
int error = lstat(cpath, &info);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error)
RETURN(INTVAL 0);
@@ -97,7 +97,7 @@
#else
int error = lstat(cpath, &info);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
char *errmsg = strerror(errno);
@@ -129,7 +129,7 @@
#else
int error = lstat(cpath, &info);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
char *errmsg = strerror(errno);
@@ -163,7 +163,7 @@
char * const cpath = Parrot_str_to_cstring(interp, path);
int error = lstat(cpath, &info);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
char *errmsg = strerror(errno);
@@ -200,13 +200,13 @@
char * const cfrom = Parrot_str_to_cstring(interp, from);
FILE * source = fopen(cfrom, "rb");
- string_cstring_free(cfrom);
+ Parrot_str_free_cstring(cfrom);
if (source) {
char * const cto = Parrot_str_to_cstring(interp, to);
FILE * target = fopen(cto, "w+b");
- string_cstring_free(cto);
+ Parrot_str_free_cstring(cto);
if (target) {
char buf[CHUNK_SIZE];
@@ -255,8 +255,8 @@
char * const cto = Parrot_str_to_cstring(interp, to);
int error = rename(cfrom, cto);
- string_cstring_free(cfrom);
- string_cstring_free(cto);
+ Parrot_str_free_cstring(cfrom);
+ Parrot_str_free_cstring(cto);
if (error) {
char *errmsg = strerror(errno);
Modified: branches/pdd28str_part2/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/fixedintegerarray.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/fixedintegerarray.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -84,7 +84,7 @@
/* "()" - no args */
if (l <= 2 && *source == '(') {
- string_cstring_free(source);
+ Parrot_str_free_cstring(source);
return SELF;
}
@@ -137,7 +137,7 @@
}
}
- string_cstring_free(source);
+ Parrot_str_free_cstring(source);
return SELF;
}
Modified: branches/pdd28str_part2/src/pmc/nci.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/nci.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/nci.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -89,7 +89,7 @@
nci_info->pcc_params_signature = CONST_STRING(interp, "");
mem_sys_free(param_sig);
- string_cstring_free(sig_c);
+ Parrot_str_free_cstring(sig_c);
}
@@ -174,7 +174,7 @@
PMC_struct_val(SELF) = func;
nci_info->signature = string_make(interp, key_c, strlen(key_c),
NULL, PObj_constant_FLAG);
- string_cstring_free(key_c);
+ Parrot_str_free_cstring(key_c);
pcc_params(INTERP, key, nci_info);
/* Arity is length of that string minus one (the return type). */
Modified: branches/pdd28str_part2/src/pmc/os.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/os.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/os.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -116,7 +116,7 @@
#else
error = chdir(cpath);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
char *errmsg = strerror(errno);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
@@ -142,7 +142,7 @@
if (error) {
const char * const errmsg = strerror(errno);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
errmsg);
}
@@ -153,7 +153,7 @@
#else
error = rmdir(cpath);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
@@ -162,7 +162,7 @@
}
else {
error = remove(cpath);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
@@ -189,7 +189,7 @@
#else
int error = mkdir(cpath, (mode_t)mode);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
@@ -228,7 +228,7 @@
char * const cpath = Parrot_str_to_cstring(interp, path);
const int error = stat(cpath, &info);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
@@ -306,7 +306,7 @@
#else
const int error = lstat(cpath, &info);
#endif
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
@@ -365,8 +365,8 @@
char * const cto = Parrot_str_to_cstring(interp, to);
const int error = symlink(cfrom, cto);
- string_cstring_free(cfrom);
- string_cstring_free(cto);
+ Parrot_str_free_cstring(cfrom);
+ Parrot_str_free_cstring(cto);
if (error) {
const char * const errmsg = strerror(errno);
@@ -395,8 +395,8 @@
char * const cto = Parrot_str_to_cstring(interp, to);
const int error = link(cfrom, cto);
- string_cstring_free(cfrom);
- string_cstring_free(cto);
+ Parrot_str_free_cstring(cfrom);
+ Parrot_str_free_cstring(cto);
if (error) {
const char * const errmsg = strerror(errno);
@@ -450,7 +450,7 @@
char * const cpath = Parrot_str_to_cstring(interp, path);
const int error = chroot(cpath);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (error) {
const char * const errmsg = strerror(errno);
@@ -481,7 +481,7 @@
STRING *retval;
DIR *dir = opendir(cpath);
- string_cstring_free(cpath);
+ Parrot_str_free_cstring(cpath);
if (!dir) {
const char * const errmsg = strerror(errno);
@@ -517,8 +517,8 @@
char * const cnewpath = Parrot_str_to_cstring(interp, newpath);
const int ret = rename(coldpath, cnewpath);
- string_cstring_free(coldpath);
- string_cstring_free(cnewpath);
+ Parrot_str_free_cstring(coldpath);
+ Parrot_str_free_cstring(cnewpath);
if (ret < 0) {
const char * const errmsg = strerror(errno) ;
Modified: branches/pdd28str_part2/src/pmc/sub.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/sub.pmc Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/pmc/sub.pmc Tue Feb 3 01:16:16 2009 (r36310)
@@ -843,13 +843,13 @@
PARROT_ASSERT(sub->n_regs_used);
if (!*kind || kind[1]) {
- string_cstring_free(kind);
+ Parrot_str_free_cstring(kind);
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"illegal register kind '%Ss'", reg);
}
p = strchr(types, *kind);
- string_cstring_free(kind);
+ Parrot_str_free_cstring(kind);
if (!p)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
Modified: branches/pdd28str_part2/src/spf_render.c
==============================================================================
--- branches/pdd28str_part2/src/spf_render.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/spf_render.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -711,7 +711,7 @@
/* the buffer is 4096, so no problem here */
sprintf(tc, tempstr, sharedint);
#endif
- string_cstring_free(tempstr);
+ Parrot_str_free_cstring(tempstr);
}
targ = Parrot_str_append(interp, targ, cstr2pstr(tc));
}
@@ -770,7 +770,7 @@
/* the buffer is 4096, so no problem here */
sprintf(tc, tempstr, (double)thefloat);
#endif
- string_cstring_free(tempstr);
+ Parrot_str_free_cstring(tempstr);
}
#ifdef WIN32
Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/src/string/api.c Tue Feb 3 01:16:16 2009 (r36310)
@@ -240,7 +240,7 @@
/*
-=item C<void string_free>
+=item C<void Parrot_str_free>
Frees the given STRING's header, accounting for reference counts for the
STRING's buffer &c. Use this only if you I<know> that nothing else has stored
@@ -251,9 +251,9 @@
*/
void
-string_free(PARROT_INTERP, ARGIN(STRING *s))
+Parrot_str_free(PARROT_INTERP, ARGIN(STRING *s))
{
- ASSERT_ARGS(string_free)
+ ASSERT_ARGS(Parrot_str_free)
if (!PObj_constant_TEST(s)) {
Small_Object_Pool * const pool = interp->arena_base->string_header_pool;
pool->add_free_object(interp, pool, s);
@@ -2097,7 +2097,7 @@
#else
f = -0.0;
#endif
- string_cstring_free(cstr);
+ Parrot_str_free_cstring(cstr);
return f;
}
@@ -2154,7 +2154,7 @@
=item C<char * Parrot_str_to_cstring>
Returns a C string for the specified Parrot string. Use
-C<string_cstring_free()> to free the string. Failure to do this will result in
+C<Parrot_str_free_cstring()> to free the string. Failure to do this will result in
a memory leak.
=cut
@@ -2182,7 +2182,7 @@
=item C<char * string_to_cstring_nullable>
Returns a C string for the specified Parrot string. Use
-C<string_cstring_free()> to free the string. Failure to do this will result in
+C<Parrot_str_free_cstring()> to free the string. Failure to do this will result in
a memory leak.
=cut
@@ -2209,7 +2209,7 @@
/*
-=item C<void string_cstring_free>
+=item C<void Parrot_str_free_cstring>
Free a string created by C<Parrot_str_to_cstring()>.
@@ -2222,16 +2222,16 @@
PARROT_EXPORT
void
-string_cstring_free(ARGIN_NULLOK(char *p))
+Parrot_str_free_cstring(ARGIN_NULLOK(char *p))
{
- ASSERT_ARGS(string_cstring_free)
+ ASSERT_ARGS(Parrot_str_free_cstring)
mem_sys_free((void *)p);
}
/*
-=item C<void string_pin>
+=item C<void Parrot_str_pin>
Replaces the specified Parrot string's managed buffer memory by system memory.
@@ -2241,9 +2241,9 @@
PARROT_EXPORT
void
-string_pin(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_pin(PARROT_INTERP, ARGMOD(STRING *s))
{
- ASSERT_ARGS(string_pin)
+ ASSERT_ARGS(Parrot_str_pin)
char *memory;
size_t size;
@@ -2267,9 +2267,9 @@
/*
-=item C<void string_unpin>
+=item C<void Parrot_str_unpin>
-Undoes a C<string_pin()> so that the string once again uses managed memory.
+Undoes a C<Parrot_str_pin()> so that the string once again uses managed memory.
=cut
@@ -2277,9 +2277,9 @@
PARROT_EXPORT
void
-string_unpin(PARROT_INTERP, ARGMOD(STRING *s))
+Parrot_str_unpin(PARROT_INTERP, ARGMOD(STRING *s))
{
- ASSERT_ARGS(string_unpin)
+ ASSERT_ARGS(Parrot_str_unpin)
void *memory;
size_t size;
Modified: branches/pdd28str_part2/t/tools/dev/searchops/samples.pm
==============================================================================
--- branches/pdd28str_part2/t/tools/dev/searchops/samples.pm Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/t/tools/dev/searchops/samples.pm Tue Feb 3 01:16:16 2009 (r36310)
@@ -190,7 +190,7 @@
if (!(interp->pdb->state & PDB_BREAK)) {
f = string_to_cstring(interp, ($1));
PDB_load_source(interp, f);
- string_cstring_free(f);
+ Parrot_str_free_cstring(f);
}
}
Modified: branches/pdd28str_part2/t/tools/ops2pm/samples/core_ops.original
==============================================================================
--- branches/pdd28str_part2/t/tools/ops2pm/samples/core_ops.original Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/t/tools/ops2pm/samples/core_ops.original Tue Feb 3 01:16:16 2009 (r36310)
@@ -190,7 +190,7 @@
PackFile_find_fixup_entry(interp, enum_fixup_label, label);
if (!fe) {
- string_cstring_free(label);
+ Parrot_str_free_cstring(label);
real_exception(interp, NULL, 1, "branch_cs: fixup for '%Ss' not found",
$1);
}
@@ -199,7 +199,7 @@
Parrot_switch_to_cs(interp, fe->seg, 1);
}
mem_sys_free(fe);
- string_cstring_free(label);
+ Parrot_str_free_cstring(label);
interp->resume_flag = 2;
goto ADDRESS(0);
}
@@ -1264,13 +1264,13 @@
VTABLE_set_pointer_keyed_str(interp, $1, $4, F2DPTR(p));
PObj_get_FLAGS($1) |= PObj_private1_FLAG;
}
- string_cstring_free(name);
+ Parrot_str_free_cstring(name);
}
op dlvar(out PMC, invar PMC, in STR) {
char * const name = string_to_cstring(interp, ($3));
void * const p = Parrot_dlsym(PMC_IS_NULL($2) ? NULL : PMC_data($2), name);
- string_cstring_free(name);
+ Parrot_str_free_cstring(name);
if (p == NULL) {
const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
Modified: branches/pdd28str_part2/tools/build/nativecall.pl
==============================================================================
--- branches/pdd28str_part2/tools/build/nativecall.pl Tue Feb 3 01:10:22 2009 (r36309)
+++ branches/pdd28str_part2/tools/build/nativecall.pl Tue Feb 3 01:16:16 2009 (r36310)
@@ -368,7 +368,7 @@
push @{$temps_ref}, "char *t_$temp_num;";
push @{$extra_preamble_ref},
"{STRING * s= GET_NCI_S($reg_num); t_$temp_num = s ? Parrot_str_to_cstring(interp, s) : (char *) NULL;}";
- push @{$extra_postamble_ref}, "do { if (t_$temp_num) string_cstring_free(t_$temp_num); } while (0);";
+ push @{$extra_postamble_ref}, "do { if (t_$temp_num) Parrot_str_free_cstring(t_$temp_num); } while (0);";
return "t_$temp_num";
};
/b/ && do {
@@ -380,7 +380,7 @@
push @{$temps_ref}, "char *s_$temp_num;\n char *t_$temp_num;\n void** v_$temp_num = (void **) &t_$temp_num;";
push @{$extra_preamble_ref},
"{STRING * s= GET_NCI_S($reg_num); t_$temp_num = s ? Parrot_str_to_cstring(interp, s) : (char *) NULL; s_$temp_num = t_$temp_num;}";
- push @{$extra_postamble_ref}, "do { if (s_$temp_num) string_cstring_free(s_$temp_num); } while (0);";
+ push @{$extra_postamble_ref}, "do { if (s_$temp_num) Parrot_str_free_cstring(s_$temp_num); } while (0);";
return "v_$temp_num";
};
/J/ && do {
More information about the parrot-commits
mailing list