[svn:parrot] r46041 - in trunk: include/parrot src/string/encoding
petdance at svn.parrot.org
petdance at svn.parrot.org
Mon Apr 26 20:39:50 UTC 2010
Author: petdance
Date: Mon Apr 26 20:39:50 2010
New Revision: 46041
URL: https://trac.parrot.org/parrot/changeset/46041
Log:
All the encoding functions now take const STRING *s. Thanks, bacek!
Modified:
trunk/include/parrot/encoding.h
trunk/src/string/encoding/fixed_8.c
trunk/src/string/encoding/ucs2.c
trunk/src/string/encoding/utf16.c
trunk/src/string/encoding/utf8.c
Modified: trunk/include/parrot/encoding.h
==============================================================================
--- trunk/include/parrot/encoding.h Mon Apr 26 20:06:36 2010 (r46040)
+++ trunk/include/parrot/encoding.h Mon Apr 26 20:39:50 2010 (r46041)
@@ -15,16 +15,16 @@
#include "parrot/parrot.h"
-typedef STRING * (*encoding_to_encoding_t)(PARROT_INTERP, NOTNULL(const STRING *src));
-typedef UINTVAL (*encoding_get_codepoint_t)(PARROT_INTERP, const STRING *src, UINTVAL offset);
-typedef UINTVAL (*encoding_get_byte_t)(PARROT_INTERP, const STRING *src, UINTVAL offset);
-typedef void (*encoding_set_byte_t)(PARROT_INTERP, const STRING *src, UINTVAL offset, UINTVAL count);
-typedef STRING *(*encoding_get_codepoints_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count);
-typedef STRING *(*encoding_get_bytes_t)(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count);
-typedef UINTVAL (*encoding_codepoints_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef UINTVAL (*encoding_bytes_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef UINTVAL (*encoding_find_cclass_t)(PARROT_INTERP, STRING *s, const INTVAL *typetable, INTVAL flags, UINTVAL offset, UINTVAL count);
-typedef size_t (*encoding_hash_t)(PARROT_INTERP, const STRING *s, size_t hashval);
+typedef STRING * (*encoding_to_encoding_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef UINTVAL (*encoding_get_codepoint_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
+typedef UINTVAL (*encoding_get_byte_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
+typedef void (*encoding_set_byte_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+typedef STRING * (*encoding_get_codepoints_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+typedef STRING * (*encoding_get_bytes_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+typedef UINTVAL (*encoding_codepoints_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef UINTVAL (*encoding_bytes_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef UINTVAL (*encoding_find_cclass_t)(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable), INTVAL flags, UINTVAL offset, UINTVAL count);
+typedef size_t (*encoding_hash_t)(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval);
/* iterator support */
Modified: trunk/src/string/encoding/fixed_8.c
==============================================================================
--- trunk/src/string/encoding/fixed_8.c Mon Apr 26 20:06:36 2010 (r46040)
+++ trunk/src/string/encoding/fixed_8.c Mon Apr 26 20:39:50 2010 (r46041)
@@ -24,16 +24,16 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *source_string))
+static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
__attribute__nonnull__(2);
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *source_string))
+static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
static UINTVAL find_cclass(SHIM_INTERP,
- ARGIN(STRING *s),
+ ARGIN(const STRING *s),
ARGIN(const INTVAL *typetable),
INTVAL flags,
UINTVAL pos,
@@ -66,14 +66,14 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL get_byte(SHIM_INTERP,
- ARGIN(const STRING *source_string),
+ ARGIN(const STRING *src),
UINTVAL offset)
__attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_bytes(PARROT_INTERP,
- ARGIN(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -81,7 +81,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *source_string),
+ ARGIN(const STRING *src),
UINTVAL offset)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -89,7 +89,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(STRING *source_string),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -103,7 +103,7 @@
FUNC_MODIFIES(*iter);
static void set_byte(PARROT_INTERP,
- ARGIN(const STRING *source_string),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL byte)
__attribute__nonnull__(1)
@@ -115,10 +115,10 @@
__attribute__nonnull__(1);
#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(source_string))
+ PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(source_string))
+ , PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s) \
, PARROT_ASSERT_ARG(typetable))
@@ -133,22 +133,22 @@
#define ASSERT_ARGS_fixed_8_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(source_string))
+ PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(source_string))
+ , PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(source_string))
+ , PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(src) \
, PARROT_ASSERT_ARG(iter))
#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(source_string))
+ , PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -182,8 +182,8 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *source_string,
-UINTVAL offset)>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
codepoints are bytes, so delegate
@@ -193,17 +193,17 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *source_string),
+get_codepoint(PARROT_INTERP, ARGIN(const STRING *src),
UINTVAL offset)
{
ASSERT_ARGS(get_codepoint)
- return get_byte(interp, source_string, offset);
+ return get_byte(interp, src, offset);
}
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, STRING *s, const INTVAL
+=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
codepoints are bytes, so delegate
@@ -214,7 +214,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-find_cclass(SHIM_INTERP, ARGIN(STRING *s), ARGIN(const INTVAL *typetable),
+find_cclass(SHIM_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
INTVAL flags, UINTVAL pos, UINTVAL end)
{
ASSERT_ARGS(find_cclass)
@@ -229,8 +229,8 @@
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *source_string,
-UINTVAL offset)>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -240,15 +240,15 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-get_byte(SHIM_INTERP, ARGIN(const STRING *source_string), UINTVAL offset)
+get_byte(SHIM_INTERP, ARGIN(const STRING *src), UINTVAL offset)
{
ASSERT_ARGS(get_byte)
- const unsigned char *contents = (const unsigned char *)source_string->strstart;
+ const unsigned char *contents = (const unsigned char *)src->strstart;
- if (offset >= source_string->bufused) {
+ if (offset >= src->bufused) {
/* Parrot_ex_throw_from_c_args(interp, NULL, 0,
"get_byte past the end of the buffer (%i of %i)",
- offset, source_string->bufused); */
+ offset, src->bufused); */
return 0;
}
@@ -257,8 +257,8 @@
/*
-=item C<static void set_byte(PARROT_INTERP, const STRING *source_string, UINTVAL
-offset, UINTVAL byte)>
+=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL byte)>
Sets, in string C<src> at position C<offset>, the byte C<byte>.
@@ -267,24 +267,23 @@
*/
static void
-set_byte(PARROT_INTERP, ARGIN(const STRING *source_string),
- UINTVAL offset, UINTVAL byte)
+set_byte(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL byte)
{
ASSERT_ARGS(set_byte)
unsigned char *contents;
- if (offset >= source_string->bufused)
+ if (offset >= src->bufused)
Parrot_ex_throw_from_c_args(interp, NULL, 0,
"set_byte past the end of the buffer");
- contents = (unsigned char *)source_string->strstart;
+ contents = (unsigned char *)src->strstart;
contents[offset] = (unsigned char)byte;
}
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
C<count>. (Delegates to C<get_bytes>.)
@@ -296,20 +295,18 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(STRING *source_string),
- UINTVAL offset, UINTVAL count)
+get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_codepoints)
- STRING * const return_string = get_bytes(interp, source_string,
- offset, count);
- return_string->charset = source_string->charset;
+ STRING * const return_string = get_bytes(interp, src, offset, count);
+ return_string->charset = src->charset;
return return_string;
}
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
-UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -320,7 +317,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_bytes(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
+get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_bytes)
STRING * const return_string = Parrot_str_copy(interp, src);
@@ -340,7 +337,7 @@
/*
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *source_string)>
+=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
Returns the number of codepoints in string C<src>.
@@ -349,15 +346,15 @@
*/
static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *source_string))
+codepoints(PARROT_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(codepoints)
- return bytes(interp, source_string);
+ return bytes(interp, src);
}
/*
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *source_string)>
+=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
Returns the number of bytes in string C<src>.
@@ -366,10 +363,10 @@
*/
static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *source_string))
+bytes(SHIM_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(bytes)
- return source_string->bufused;
+ return src->bufused;
}
/*
Modified: trunk/src/string/encoding/ucs2.c
==============================================================================
--- trunk/src/string/encoding/ucs2.c Mon Apr 26 20:06:36 2010 (r46040)
+++ trunk/src/string/encoding/ucs2.c Mon Apr 26 20:39:50 2010 (r46041)
@@ -47,7 +47,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL find_cclass(PARROT_INTERP,
- ARGIN(STRING *s),
+ ARGIN(const STRING *s),
ARGIN(const INTVAL *typetable),
INTVAL flags,
UINTVAL pos,
@@ -64,7 +64,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_bytes(PARROT_INTERP,
- SHIM(STRING *src),
+ SHIM(const STRING *src),
SHIM(UINTVAL offset),
SHIM(UINTVAL count))
__attribute__nonnull__(1);
@@ -78,7 +78,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -233,7 +233,7 @@
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, STRING *s, const INTVAL
+=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
Stub, the charset level handles this for unicode strings.
@@ -244,7 +244,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-find_cclass(PARROT_INTERP, ARGIN(STRING *s), ARGIN(const INTVAL *typetable),
+find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
INTVAL flags, UINTVAL pos, UINTVAL end)
{
UNUSED(s);
@@ -297,7 +297,7 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
@@ -310,7 +310,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
+get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_codepoints)
STRING * const return_string = Parrot_str_copy(interp, src);
@@ -338,8 +338,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
-UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -350,7 +350,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_bytes(PARROT_INTERP, SHIM(STRING *src), SHIM(UINTVAL offset),
+get_bytes(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
SHIM(UINTVAL count))
{
ASSERT_ARGS(get_bytes)
Modified: trunk/src/string/encoding/utf16.c
==============================================================================
--- trunk/src/string/encoding/utf16.c Mon Apr 26 20:06:36 2010 (r46040)
+++ trunk/src/string/encoding/utf16.c Mon Apr 26 20:39:50 2010 (r46041)
@@ -37,7 +37,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL find_cclass(PARROT_INTERP,
- ARGIN(STRING *s),
+ ARGIN(const STRING *s),
ARGIN(const INTVAL *typetable),
INTVAL flags,
UINTVAL pos,
@@ -54,7 +54,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_bytes(PARROT_INTERP,
- ARGIN(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -69,7 +69,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -284,7 +284,7 @@
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, STRING *s, const INTVAL
+=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
Stub, the charset level handles this for unicode strings.
@@ -295,7 +295,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-find_cclass(PARROT_INTERP, ARGIN(STRING *s), ARGIN(const INTVAL *typetable),
+find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
INTVAL flags, UINTVAL pos, UINTVAL end)
{
UNUSED(s);
@@ -361,7 +361,7 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
@@ -374,7 +374,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
+get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_codepoints)
String_iter iter;
@@ -395,8 +395,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
-UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -407,7 +407,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_bytes(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
+get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_bytes)
UNUSED(interp);
Modified: trunk/src/string/encoding/utf8.c
==============================================================================
--- trunk/src/string/encoding/utf8.c Mon Apr 26 20:06:36 2010 (r46040)
+++ trunk/src/string/encoding/utf8.c Mon Apr 26 20:39:50 2010 (r46041)
@@ -37,7 +37,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL find_cclass(PARROT_INTERP,
- SHIM(STRING *s),
+ SHIM(const STRING *s),
SHIM(const INTVAL *typetable),
SHIM(INTVAL flags),
SHIM(UINTVAL pos),
@@ -51,12 +51,11 @@
PARROT_CANNOT_RETURN_NULL
static STRING * get_bytes(PARROT_INTERP,
- ARGMOD(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*src);
+ __attribute__nonnull__(2);
static UINTVAL get_codepoint(PARROT_INTERP,
ARGIN(const STRING *src),
@@ -66,7 +65,7 @@
PARROT_CANNOT_RETURN_NULL
static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(STRING *src),
+ ARGIN(const STRING *src),
UINTVAL offset,
UINTVAL count)
__attribute__nonnull__(1)
@@ -592,7 +591,7 @@
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, STRING *s, const INTVAL
+=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
Stub, the charset level handles this for unicode strings.
@@ -603,7 +602,7 @@
PARROT_WARN_UNUSED_RESULT
static UINTVAL
-find_cclass(PARROT_INTERP, SHIM(STRING *s), SHIM(const INTVAL *typetable),
+find_cclass(PARROT_INTERP, SHIM(const STRING *s), SHIM(const INTVAL *typetable),
SHIM(INTVAL flags), SHIM(UINTVAL pos), SHIM(UINTVAL end))
{
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -664,7 +663,7 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
@@ -676,7 +675,7 @@
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(STRING *src), UINTVAL offset, UINTVAL count)
+get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_codepoints)
@@ -704,8 +703,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
-UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -715,7 +714,7 @@
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_bytes(PARROT_INTERP, ARGMOD(STRING *src), UINTVAL offset, UINTVAL count)
+get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
ASSERT_ARGS(get_bytes)
STRING * const return_string = Parrot_str_copy(interp, src);
More information about the parrot-commits
mailing list