[svn:parrot] r46268 - in trunk: . docs docs/pdds include/parrot src/pmc src/string
coke at svn.parrot.org
coke at svn.parrot.org
Tue May 4 03:44:50 UTC 2010
Author: coke
Date: Tue May 4 03:44:50 2010
New Revision: 46268
URL: https://trac.parrot.org/parrot/changeset/46268
Log:
rename Parrot_string_cstring to Parrot_str_cstring
Closes TT #1586
Modified:
trunk/DEPRECATED.pod
trunk/docs/embed.pod
trunk/docs/pdds/pdd28_strings.pod
trunk/include/parrot/string_funcs.h
trunk/src/pmc/packfile.pmc
trunk/src/pmc/packfilefixupentry.pmc
trunk/src/string/api.c
Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod Tue May 4 03:21:03 2010 (r46267)
+++ trunk/DEPRECATED.pod Tue May 4 03:44:50 2010 (r46268)
@@ -281,12 +281,6 @@
L<https://trac.parrot.org/parrot/ticket/1584>
-=item Parrot_string_* [eligible in 2.4]
-
-rename Parrot_string_cstring to Parrot_str_cstring
-
-L<https://trac.parrot.org/parrot/ticket/1586>
-
=item STRING COW [eligible in 2.4]
COW strings are to be removed. All "inplace" string modification
Modified: trunk/docs/embed.pod
==============================================================================
--- trunk/docs/embed.pod Tue May 4 03:21:03 2010 (r46267)
+++ trunk/docs/embed.pod Tue May 4 03:44:50 2010 (r46268)
@@ -1587,7 +1587,7 @@
=item C<Parrot_str_indexed>
-=item C<Parrot_string_cstring>
+=item C<Parrot_str_cstring>
=item C<Parrot_str_init>
Modified: trunk/docs/pdds/pdd28_strings.pod
==============================================================================
--- trunk/docs/pdds/pdd28_strings.pod Tue May 4 03:21:03 2010 (r46267)
+++ trunk/docs/pdds/pdd28_strings.pod Tue May 4 03:44:50 2010 (r46268)
@@ -614,11 +614,10 @@
Old Perl 5-style behavior where "aa" goes to "bb". Only useful for ASCII
strings, and not terribly useful even there.
-=head4 Parrot_string_cstring
+=head4 Parrot_str_cstring
Unsafe, and behavior handled by Parrot_str_to_cstring.
-
=head4 Parrot_str_split
Splits the string C<str> at the delimiter C<delim>.
Modified: trunk/include/parrot/string_funcs.h
==============================================================================
--- trunk/include/parrot/string_funcs.h Tue May 4 03:21:03 2010 (r46267)
+++ trunk/include/parrot/string_funcs.h Tue May 4 03:44:50 2010 (r46268)
@@ -114,6 +114,12 @@
__attribute__nonnull__(2);
PARROT_EXPORT
+PARROT_PURE_FUNCTION
+PARROT_CANNOT_RETURN_NULL
+const char * Parrot_str_cstring(SHIM_INTERP, ARGIN(const STRING *str))
+ __attribute__nonnull__(2);
+
+PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_MALLOC
STRING * Parrot_str_downcase(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
@@ -380,12 +386,6 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CANNOT_RETURN_NULL
-const char * Parrot_string_cstring(SHIM_INTERP, ARGIN(const STRING *str))
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
STRING * string_chr(PARROT_INTERP, UINTVAL character)
@@ -497,6 +497,8 @@
#define ASSERT_ARGS_Parrot_str_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_Parrot_str_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_str_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_str_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -585,8 +587,6 @@
, PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_Parrot_str_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_string_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_string_chr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_string_increment __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: trunk/src/pmc/packfile.pmc
==============================================================================
--- trunk/src/pmc/packfile.pmc Tue May 4 03:21:03 2010 (r46267)
+++ trunk/src/pmc/packfile.pmc Tue May 4 03:44:50 2010 (r46268)
@@ -175,7 +175,7 @@
Parrot_Packfile_attributes * const attrs = PARROT_PACKFILE(SELF);
PackFile * const pf = PackFile_new(interp, 0);
const opcode_t * const ptr =
- (const opcode_t *)Parrot_string_cstring(interp, str);
+ (const opcode_t *)Parrot_str_cstring(interp, str);
const int length = Parrot_str_byte_length(interp, str);
@@ -256,7 +256,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
"Packfile: No such integer key \"%s\"",
- Parrot_string_cstring(interp, key));
+ Parrot_str_cstring(interp, key));
}
/*
@@ -280,7 +280,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
"Packfile: No such string key \"%s\"",
- Parrot_string_cstring(interp, key));
+ Parrot_str_cstring(interp, key));
}
@@ -356,7 +356,7 @@
}
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
"Packfile: No such integer key \"%s\"",
- Parrot_string_cstring(interp, key));
+ Parrot_str_cstring(interp, key));
}
@@ -400,7 +400,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
"Packfile: No such string key \"%s\"",
- Parrot_string_cstring(interp, key));
+ Parrot_str_cstring(interp, key));
}
/*
Modified: trunk/src/pmc/packfilefixupentry.pmc
==============================================================================
--- trunk/src/pmc/packfilefixupentry.pmc Tue May 4 03:21:03 2010 (r46267)
+++ trunk/src/pmc/packfilefixupentry.pmc Tue May 4 03:44:50 2010 (r46268)
@@ -102,7 +102,7 @@
mem_gc_allocate_zeroed_typed(INTERP, PackFile_FixupEntry);
entry->type = attrs->type;
- entry->name = strdup(Parrot_string_cstring(interp, attrs->name));
+ entry->name = strdup(Parrot_str_cstring(interp, attrs->name));
entry->offset = attrs->offset;
return entry;
}
Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c Tue May 4 03:21:03 2010 (r46267)
+++ trunk/src/string/api.c Tue May 4 03:44:50 2010 (r46268)
@@ -2716,7 +2716,7 @@
/*
-=item C<const char * Parrot_string_cstring(PARROT_INTERP, const STRING *str)>
+=item C<const char * Parrot_str_cstring(PARROT_INTERP, const STRING *str)>
Returns a C string from a Parrot string. Both sides are treated
as constants -- i.e. do not resize the result.
@@ -2729,9 +2729,9 @@
PARROT_PURE_FUNCTION
PARROT_CANNOT_RETURN_NULL
const char *
-Parrot_string_cstring(SHIM_INTERP, ARGIN(const STRING *str))
+Parrot_str_cstring(SHIM_INTERP, ARGIN(const STRING *str))
{
- ASSERT_ARGS(Parrot_string_cstring)
+ ASSERT_ARGS(Parrot_str_cstring)
/* TODO handle NULL and friends */
return str->strstart;
}
More information about the parrot-commits
mailing list