[svn:parrot] r39800 - trunk/src/string/charset

rblasch at svn.parrot.org rblasch at svn.parrot.org
Fri Jun 26 14:11:13 UTC 2009


Author: rblasch
Date: Fri Jun 26 14:11:12 2009
New Revision: 39800
URL: https://trac.parrot.org/parrot/changeset/39800

Log:
Use C89 variable declarations, or it won't compile on C89 compilers like VC9.

Modified:
   trunk/src/string/charset/unicode.c

Modified: trunk/src/string/charset/unicode.c
==============================================================================
--- trunk/src/string/charset/unicode.c	Fri Jun 26 14:03:03 2009	(r39799)
+++ trunk/src/string/charset/unicode.c	Fri Jun 26 14:11:12 2009	(r39800)
@@ -416,6 +416,11 @@
 upcase(PARROT_INTERP, ARGIN(STRING *src))
 {
     ASSERT_ARGS(upcase)
+#if PARROT_HAS_ICU
+    UErrorCode err;
+    int dest_len, src_len, needed;
+#endif
+
     if (src->bufused  == src->strlen
             && src->encoding == Parrot_utf8_encoding_ptr) {
         Parrot_ascii_charset_ptr->downcase(interp, src);
@@ -423,9 +428,6 @@
     }
 
 #if PARROT_HAS_ICU
-    UErrorCode err;
-    int dest_len, src_len, needed;
-
     if (src->bufused  == src->strlen
     &&  src->encoding == Parrot_utf8_encoding_ptr) {
         Parrot_ascii_charset_ptr->upcase(interp, src);
@@ -515,6 +517,11 @@
 downcase(PARROT_INTERP, ARGIN(STRING *src))
 {
     ASSERT_ARGS(downcase)
+#if PARROT_HAS_ICU
+    UErrorCode err;
+    int dest_len, src_len;
+#endif
+
     if (src->bufused  == src->strlen
             && src->encoding == Parrot_utf8_encoding_ptr) {
         Parrot_ascii_charset_ptr->downcase(interp, src);
@@ -522,9 +529,6 @@
     }
 
 #if PARROT_HAS_ICU
-    UErrorCode err;
-    int dest_len, src_len;
-
     src = Parrot_utf16_encoding_ptr->to_encoding(interp, src, NULL);
     /*
 U_CAPI int32_t U_EXPORT2


More information about the parrot-commits mailing list