Author: chromatic
Date: Sat May 26 17:46:52 2007
New Revision: 18651

Modified:
   trunk/include/parrot/encoding.h
   trunk/src/charset/ascii.c
   trunk/src/charset/ascii.h
   trunk/src/charset/binary.c
   trunk/src/charset/unicode.c
   trunk/src/encodings/fixed_8.c
   trunk/src/encodings/ucs2.c
   trunk/src/encodings/utf16.c
   trunk/src/encodings/utf8.c

Log:
[Encodings] Remove compilation warnings from string comparisons.

Modified: trunk/include/parrot/encoding.h
==============================================================================
--- trunk/include/parrot/encoding.h     (original)
+++ trunk/include/parrot/encoding.h     Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /* encoding.h
- *  Copyright (C) 2004-2006, The Perl Foundation.
+ *  Copyright (C) 2004-2007, The Perl Foundation.
  *  SVN Info
  *     $Id$
  *  Overview:
@@ -34,7 +34,7 @@
 
 struct string_iterator_t;       /* s. parrot/string.h */
 
-typedef void (*encoding_iter_init_t)(Interp *, STRING *src,
+typedef void (*encoding_iter_init_t)(Interp *, const STRING *src,
         struct string_iterator_t *);
 
 struct _encoding {

Modified: trunk/src/charset/ascii.c
==============================================================================
--- trunk/src/charset/ascii.c   (original)
+++ trunk/src/charset/ascii.c   Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004, The Perl Foundation.
+Copyright (C) 2004-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -234,7 +234,7 @@
 }
 
 INTVAL
-ascii_compare(Interp *interp, STRING *lhs, STRING *rhs)
+ascii_compare(Interp *interp, const STRING *lhs, const STRING *rhs)
 {
     UINTVAL offs, l_len, r_len, min_len;
     String_iter iter;

Modified: trunk/src/charset/ascii.h
==============================================================================
--- trunk/src/charset/ascii.h   (original)
+++ trunk/src/charset/ascii.h   Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /* ascii.h
- *  Copyright (C) 2004, The Perl Foundation.
+ *  Copyright (C) 2004-2007, The Perl Foundation.
  *  SVN Info
  *     $Id$
  *  Overview:
@@ -27,8 +27,7 @@
         UINTVAL offset, UINTVAL count);
 STRING *ascii_get_graphemes_inplace(Interp *, STRING *source_string,
         UINTVAL offset, UINTVAL count, STRING *dest_string);
-INTVAL ascii_compare(Interp *, STRING *lhs, STRING *rhs);
-INTVAL ascii_compare(Interp *, STRING *lhs, STRING *rhs);
+INTVAL ascii_compare(Interp *, const STRING *lhs, const STRING *rhs);
 INTVAL ascii_cs_index(Interp *, STRING *source_string,
         STRING *search_string, UINTVAL offset);
 INTVAL ascii_cs_rindex(Interp *, STRING *source_string,

Modified: trunk/src/charset/binary.c
==============================================================================
--- trunk/src/charset/binary.c  (original)
+++ trunk/src/charset/binary.c  Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004, The Perl Foundation.
+Copyright (C) 2004-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -98,7 +98,7 @@
 }
 
 static INTVAL
-compare(Interp *interp, STRING *lhs, STRING *rhs)
+compare(Interp *interp, const STRING *lhs, const STRING *rhs)
 {
   return 0;
 }

Modified: trunk/src/charset/unicode.c
==============================================================================
--- trunk/src/charset/unicode.c (original)
+++ trunk/src/charset/unicode.c Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2005, The Perl Foundation.
+Copyright (C) 2005-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -310,7 +310,7 @@
 }
 
 static INTVAL
-compare(Interp *interp, STRING *lhs, STRING *rhs)
+compare(Interp *interp, const STRING *lhs, const STRING *rhs)
 {
     String_iter l_iter, r_iter;
     UINTVAL offs, cl, cr, min_len, l_len, r_len;

Modified: trunk/src/encodings/fixed_8.c
==============================================================================
--- trunk/src/encodings/fixed_8.c       (original)
+++ trunk/src/encodings/fixed_8.c       Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004, The Perl Foundation.
+Copyright (C) 2004-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -187,7 +187,7 @@
 
 
 static void
-iter_init(Interp *interp, String *src, String_iter *iter)
+iter_init(Interp *interp, const String *src, String_iter *iter)
 {
     iter->str = src;
     iter->bytepos = iter->charpos = 0;

Modified: trunk/src/encodings/ucs2.c
==============================================================================
--- trunk/src/encodings/ucs2.c  (original)
+++ trunk/src/encodings/ucs2.c  Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -30,7 +30,7 @@
 #define UNIMPL internal_exception(UNIMPLEMENTED, "unimpl ucs2")
 
 
-static void iter_init(Interp *, String *src, String_iter *iter);
+static void iter_init(Interp *, const String *src, String_iter *iter);
 
 
 static STRING *
@@ -217,7 +217,7 @@
 
 #endif
 static void
-iter_init(Interp *interp, String *src, String_iter *iter)
+iter_init(Interp *interp, const String *src, String_iter *iter)
 {
     iter->str = src;
     iter->bytepos = iter->charpos = 0;

Modified: trunk/src/encodings/utf16.c
==============================================================================
--- trunk/src/encodings/utf16.c (original)
+++ trunk/src/encodings/utf16.c Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -31,7 +31,7 @@
 #define UNIMPL internal_exception(UNIMPLEMENTED, "unimpl utf16")
 
 
-static void iter_init(Interp *, String *src, String_iter *iter);
+static void iter_init(Interp *, const String *src, String_iter *iter);
 
 /*
 
@@ -326,7 +326,7 @@
 
 #endif
 static void
-iter_init(Interp *interp, String *src, String_iter *iter)
+iter_init(Interp *interp, const String *src, String_iter *iter)
 {
     iter->str = src;
     iter->bytepos = iter->charpos = 0;

Modified: trunk/src/encodings/utf8.c
==============================================================================
--- trunk/src/encodings/utf8.c  (original)
+++ trunk/src/encodings/utf8.c  Sat May 26 17:46:52 2007
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2007, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -47,7 +47,7 @@
 typedef unsigned char utf8_t;
 #endif
 
-static void iter_init(Interp *, String *src, String_iter *iter);
+static void iter_init(Interp *, const String *src, String_iter *iter);
 /*
 
 =item C<static UINTVAL
@@ -527,7 +527,7 @@
 }
 
 static void
-iter_init(Interp *interp, String *src, String_iter *iter)
+iter_init(Interp *interp, const String *src, String_iter *iter)
 {
     iter->str = src;
     iter->bytepos = iter->charpos = 0;

Reply via email to