summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/TAO_IDL/ast/ast_generator.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_generator.cpp4
-rw-r--r--TAO/tao/ORB.cpp6
-rw-r--r--TAO/tao/ORB.h7
-rw-r--r--TAO/tao/POA.cpp2
-rw-r--r--TAO/tao/encode.cpp2
6 files changed, 10 insertions, 15 deletions
diff --git a/TAO/TAO_IDL/ast/ast_generator.cpp b/TAO/TAO_IDL/ast/ast_generator.cpp
index 7ff63ee76fd..65b03aee387 100644
--- a/TAO/TAO_IDL/ast/ast_generator.cpp
+++ b/TAO/TAO_IDL/ast/ast_generator.cpp
@@ -391,9 +391,7 @@ AST_Generator::create_string(AST_Expression *ms)
AST_String *
AST_Generator::create_wstring(AST_Expression *ms)
{
- typedef ACE_UINT16 WChar;
-
- return new AST_String(ms, sizeof(WChar));
+ return new AST_String(ms, sizeof(ACE_OS::WChar));
}
/*
diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp
index b0dc26b7dc4..4279bcdf2de 100644
--- a/TAO/TAO_IDL/be/be_generator.cpp
+++ b/TAO/TAO_IDL/be/be_generator.cpp
@@ -390,9 +390,7 @@ be_generator::create_string(AST_Expression *v)
AST_String *
be_generator::create_wstring(AST_Expression *v)
{
- typedef ACE_UINT16 WChar;
-
- return (AST_String *) new be_string(v, sizeof(WChar));
+ return (AST_String *) new be_string(v, sizeof(ACE_OS::WChar));
}
/*
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index a98ea682f9d..2aa6baaab3e 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -620,11 +620,11 @@ wscpy (CORBA::WChar *dest,
CORBA::WString
CORBA::wstring_copy (const CORBA::WChar *const str)
{
- if (*str)
+ if (!str)
return 0;
- CORBA::WString retval = CORBA::wstring_alloc (ACE_WString::wstrlen (str));
- return wscpy (retval, str);
+ CORBA::WString retval = CORBA::wstring_alloc (ACE_OS::wslen (str));
+ return ACE_OS::wscpy (retval, str);
}
void
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index deae099dad3..df69c0666ed 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -447,11 +447,10 @@ public:
void operator= (const String_var &);
};
- // 94-9-32 Appendix A defines 16-bit UNICODE characters as "WChar",
- // and null-terminated strings of them as "WString". These are IDL
- // extensions, not yet standard.
+ // WChar is an IDL extension, not yet standard. We use 32 bits
+ // because that's what many platforms use for their native wchar_t.
- typedef ACE_UINT16 WChar;
+ typedef ACE_OS::WChar WChar;
typedef WChar *WString;
typedef WChar &WChar_out;
diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp
index 36a000fdfd5..73e85967b36 100644
--- a/TAO/tao/POA.cpp
+++ b/TAO/tao/POA.cpp
@@ -2918,7 +2918,7 @@ TAO_POA::wstring_to_ObjectId (const CORBA::WChar *string)
// We DO NOT include the zero terminator, as this is simply an
// artifact of the way strings are stored in C.
//
- CORBA::ULong string_length = ACE_WString::wstrlen (string);
+ CORBA::ULong string_length = ACE_OS::wslen (string);
size_t buffer_size = string_length * sizeof (CORBA::WChar);
diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp
index 1f2ecda2695..dbee8214332 100644
--- a/TAO/tao/encode.cpp
+++ b/TAO/tao/encode.cpp
@@ -1320,7 +1320,7 @@ TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc,
if (env.exception () == 0)
{
// get the actual length of the string
- CORBA::ULong len = ACE_WString::wstrlen ((CORBA::WChar *) str);
+ CORBA::ULong len = ACE_OS::wslen ((CORBA::WChar *) str);
// if it is an unbounded string or if the length is less than the
// bounds for an unbounded string