]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/toolutil/dbgutil.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / dbgutil.cpp
index c0254554ae1580696eaffaa5f0de2805c6a77640..a5a3f518bb67f1bd505903986f647696c4dd5f2b 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /********************************************************************
  * COPYRIGHT:
- * Copyright (c) 2007-2010, International Business Machines Corporation and
+ * Copyright (c) 2007-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -74,7 +76,7 @@ static void udbg_setup(void) {
 
 
 
-U_CAPI const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
+U_TOOLUTIL_API const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
     if(strs == NULL ) {
         udbg_setup();
     }
@@ -115,7 +117,7 @@ U_CAPI int32_t
 udbg_stoi(const UnicodeString &s)
 {
     char ch[256];
-    const UChar *u = s.getBuffer();
+    const UChar *u = toUCharPtr(s.getBuffer());
     int32_t len = s.length();
     u_UCharsToChars(u, ch, len);
     ch[len] = 0; /* include terminating \0 */
@@ -127,7 +129,7 @@ U_CAPI double
 udbg_stod(const UnicodeString &s)
 {
     char ch[256];
-    const UChar *u = s.getBuffer();
+    const UChar *u = toUCharPtr(s.getBuffer());
     int32_t len = s.length();
     u_UCharsToChars(u, ch, len);
     ch[len] = 0; /* include terminating \0 */