[svn:parrot] r45754 - in branches/immutable_strings_part1/src/string: charset encoding
petdance at svn.parrot.org
petdance at svn.parrot.org
Sat Apr 17 14:45:13 UTC 2010
Author: petdance
Date: Sat Apr 17 14:45:12 2010
New Revision: 45754
URL: https://trac.parrot.org/parrot/changeset/45754
Log:
consting underlying charset pointers
Modified:
branches/immutable_strings_part1/src/string/charset/ascii.c
branches/immutable_strings_part1/src/string/charset/ascii.h
branches/immutable_strings_part1/src/string/charset/binary.c
branches/immutable_strings_part1/src/string/charset/binary.h
branches/immutable_strings_part1/src/string/charset/iso-8859-1.c
branches/immutable_strings_part1/src/string/charset/iso-8859-1.h
branches/immutable_strings_part1/src/string/charset/unicode.c
branches/immutable_strings_part1/src/string/charset/unicode.h
branches/immutable_strings_part1/src/string/encoding/fixed_8.c
branches/immutable_strings_part1/src/string/encoding/fixed_8.h
branches/immutable_strings_part1/src/string/encoding/ucs2.c
branches/immutable_strings_part1/src/string/encoding/ucs2.h
branches/immutable_strings_part1/src/string/encoding/utf16.c
branches/immutable_strings_part1/src/string/encoding/utf16.h
branches/immutable_strings_part1/src/string/encoding/utf8.c
branches/immutable_strings_part1/src/string/encoding/utf8.h
Modified: branches/immutable_strings_part1/src/string/charset/ascii.c
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/ascii.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/ascii.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -795,7 +795,7 @@
/*
-=item C<const CHARSET * Parrot_charset_ascii_init(PARROT_INTERP)>
+=item C<void Parrot_charset_ascii_init(PARROT_INTERP)>
Initialize the ASCII charset but registering all the necessary
function pointers and settings.
@@ -804,8 +804,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-const CHARSET *
+void
Parrot_charset_ascii_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_charset_ascii_init)
@@ -837,7 +836,8 @@
STRUCT_COPY_FROM_STRUCT(return_set, base_set);
return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
Parrot_register_charset(interp, "ascii", return_set);
- return return_set;
+
+ return;
}
/*
Modified: branches/immutable_strings_part1/src/string/charset/ascii.h
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/ascii.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/ascii.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -80,8 +80,7 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-PARROT_CANNOT_RETURN_NULL
-const CHARSET * Parrot_charset_ascii_init(PARROT_INTERP)
+void Parrot_charset_ascii_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_ascii_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/charset/binary.c
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/binary.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/binary.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -480,7 +480,7 @@
/*
-=item C<const CHARSET * Parrot_charset_binary_init(PARROT_INTERP)>
+=item C<void Parrot_charset_binary_init(PARROT_INTERP)>
Initialize the binary charset, including function pointers and
settings.
@@ -489,8 +489,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-const CHARSET *
+void
Parrot_charset_binary_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_charset_binary_init)
@@ -522,7 +521,8 @@
STRUCT_COPY_FROM_STRUCT(return_set, base_set);
return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
Parrot_register_charset(interp, "binary", return_set);
- return return_set;
+
+ return;
}
Modified: branches/immutable_strings_part1/src/string/charset/binary.h
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/binary.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/binary.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -16,8 +16,7 @@
/* HEADERIZER BEGIN: src/string/charset/binary.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-const CHARSET * Parrot_charset_binary_init(PARROT_INTERP)
+void Parrot_charset_binary_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_charset_binary_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/charset/iso-8859-1.c
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/iso-8859-1.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/iso-8859-1.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -640,7 +640,7 @@
/*
-=item C<const CHARSET * Parrot_charset_iso_8859_1_init(PARROT_INTERP)>
+=item C<void Parrot_charset_iso_8859_1_init(PARROT_INTERP)>
Initializes the ISO-8859-1 charset by installing all the necessary function pointers.
@@ -648,8 +648,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-const CHARSET *
+void
Parrot_charset_iso_8859_1_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_charset_iso_8859_1_init)
@@ -681,7 +680,8 @@
STRUCT_COPY_FROM_STRUCT(return_set, base_set);
return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
Parrot_register_charset(interp, "iso-8859-1", return_set);
- return return_set;
+
+ return;
}
/*
Modified: branches/immutable_strings_part1/src/string/charset/iso-8859-1.h
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/iso-8859-1.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/iso-8859-1.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -22,8 +22,7 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_CANNOT_RETURN_NULL
-const CHARSET * Parrot_charset_iso_8859_1_init(PARROT_INTERP)
+void Parrot_charset_iso_8859_1_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_charset_cvt_iso_8859_1_to_ascii \
Modified: branches/immutable_strings_part1/src/string/charset/unicode.c
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/unicode.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/unicode.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -1017,7 +1017,7 @@
/*
-=item C<const CHARSET * Parrot_charset_unicode_init(PARROT_INTERP)>
+=item C<void Parrot_charset_unicode_init(PARROT_INTERP)>
Initializes the Unicode charset by installing all the necessary function
pointers.
@@ -1026,8 +1026,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-const CHARSET *
+void
Parrot_charset_unicode_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_charset_unicode_init)
@@ -1066,7 +1065,8 @@
*/
return_set->preferred_encoding = Parrot_utf8_encoding_ptr;
Parrot_register_charset(interp, "unicode", return_set);
- return return_set;
+
+ return;
}
Modified: branches/immutable_strings_part1/src/string/charset/unicode.h
==============================================================================
--- branches/immutable_strings_part1/src/string/charset/unicode.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/charset/unicode.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -21,8 +21,7 @@
/* HEADERIZER BEGIN: src/string/charset/unicode.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-const CHARSET * Parrot_charset_unicode_init(PARROT_INTERP)
+void Parrot_charset_unicode_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_charset_unicode_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/encoding/fixed_8.c
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/fixed_8.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/fixed_8.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -516,7 +516,7 @@
/*
-=item C<ENCODING * Parrot_encoding_fixed_8_init(PARROT_INTERP)>
+=item C<void Parrot_encoding_fixed_8_init(PARROT_INTERP)>
Initializes the fixed-8 encoding.
@@ -524,8 +524,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-ENCODING *
+void
Parrot_encoding_fixed_8_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_encoding_fixed_8_init)
@@ -550,7 +549,8 @@
STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
Parrot_register_encoding(interp, "fixed_8", return_encoding);
- return return_encoding;
+
+ return;
}
Modified: branches/immutable_strings_part1/src/string/encoding/fixed_8.h
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/fixed_8.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/fixed_8.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -16,8 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/fixed_8.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_encoding_fixed_8_init(PARROT_INTERP)
+void Parrot_encoding_fixed_8_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_encoding_fixed_8_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/encoding/ucs2.c
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/ucs2.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/ucs2.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -604,7 +604,7 @@
/*
-=item C<ENCODING * Parrot_encoding_ucs2_init(PARROT_INTERP)>
+=item C<void Parrot_encoding_ucs2_init(PARROT_INTERP)>
Initializes the UCS-2 encoding.
@@ -612,8 +612,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-ENCODING *
+void
Parrot_encoding_ucs2_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_encoding_ucs2_init)
@@ -637,7 +636,8 @@
};
STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
Parrot_register_encoding(interp, "ucs2", return_encoding);
- return return_encoding;
+
+ return;
}
/*
Modified: branches/immutable_strings_part1/src/string/encoding/ucs2.h
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/ucs2.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/ucs2.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -16,8 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/ucs2.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_encoding_ucs2_init(PARROT_INTERP)
+void Parrot_encoding_ucs2_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_encoding_ucs2_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/encoding/utf16.c
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/utf16.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/utf16.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -612,7 +612,7 @@
/*
-=item C<ENCODING * Parrot_encoding_utf16_init(PARROT_INTERP)>
+=item C<void Parrot_encoding_utf16_init(PARROT_INTERP)>
Initializes the UTF-16 encoding.
@@ -620,8 +620,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-ENCODING *
+void
Parrot_encoding_utf16_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_encoding_utf16_init)
@@ -645,7 +644,8 @@
};
STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
Parrot_register_encoding(interp, "utf16", return_encoding);
- return return_encoding;
+
+ return;
}
/*
Modified: branches/immutable_strings_part1/src/string/encoding/utf16.h
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/utf16.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/utf16.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -16,8 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/utf16.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_encoding_utf16_init(PARROT_INTERP)
+void Parrot_encoding_utf16_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_encoding_utf16_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/immutable_strings_part1/src/string/encoding/utf8.c
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/utf8.c Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/utf8.c Sat Apr 17 14:45:12 2010 (r45754)
@@ -832,7 +832,7 @@
/*
-=item C<ENCODING * Parrot_encoding_utf8_init(PARROT_INTERP)>
+=item C<void Parrot_encoding_utf8_init(PARROT_INTERP)>
Initializes the UTF-8 encoding.
@@ -840,8 +840,7 @@
*/
-PARROT_CANNOT_RETURN_NULL
-ENCODING *
+void
Parrot_encoding_utf8_init(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_encoding_utf8_init)
@@ -865,7 +864,8 @@
};
STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
Parrot_register_encoding(interp, "utf8", return_encoding);
- return return_encoding;
+
+ return;
}
/*
Modified: branches/immutable_strings_part1/src/string/encoding/utf8.h
==============================================================================
--- branches/immutable_strings_part1/src/string/encoding/utf8.h Sat Apr 17 14:32:13 2010 (r45753)
+++ branches/immutable_strings_part1/src/string/encoding/utf8.h Sat Apr 17 14:45:12 2010 (r45754)
@@ -16,8 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/utf8.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_encoding_utf8_init(PARROT_INTERP)
+void Parrot_encoding_utf8_init(PARROT_INTERP)
__attribute__nonnull__(1);
#define ASSERT_ARGS_Parrot_encoding_utf8_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
More information about the parrot-commits
mailing list