summaryrefslogtreecommitdiff
path: root/TAO/interop-tests/wchar/interop_wchar_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/interop-tests/wchar/interop_wchar_i.cpp')
-rw-r--r--TAO/interop-tests/wchar/interop_wchar_i.cpp77
1 files changed, 17 insertions, 60 deletions
diff --git a/TAO/interop-tests/wchar/interop_wchar_i.cpp b/TAO/interop-tests/wchar/interop_wchar_i.cpp
index 88aa05387ca..907d1c45285 100644
--- a/TAO/interop-tests/wchar/interop_wchar_i.cpp
+++ b/TAO/interop-tests/wchar/interop_wchar_i.cpp
@@ -98,86 +98,43 @@ interop_WChar_Passer_i::warray_from_server (CORBA::Short key
CORBA::Boolean
interop_WChar_Passer_i::wstruct_to_server (const interop::wstruct & test,
CORBA::Short key
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC (( CORBA::SystemException ))
{
return
ref_.match_wchar (key,test.st_char) &&
ref_.match_wstring (key,test.st_string) &&
ref_.match_warray (key,test.st_array) &&
- this->any_to_server (test.st_any,key ACE_ENV_ARG_PARAMETER);
+ this->any_to_server (test.st_any,key);
}
interop::wstruct *
interop_WChar_Passer_i::wstruct_from_server (CORBA::Short key
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC (( CORBA::SystemException ))
{
- interop::wstruct_var ws = new interop::wstruct ();
- ws->st_char = this->wchar_from_server(key ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- ws->st_string = this->wstring_from_server(key ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ interop::wstruct *ws = new interop::wstruct ();
+ ws->st_char = this->wchar_from_server(key);
+ ws->st_string = this->wstring_from_server(key);
ref_.assign_warray (key, ws->st_array);
ws->st_any <<= ref_.get_wstring(key);
- return ws._retn ();
-}
-
-CORBA::Boolean
-interop_WChar_Passer_i::wstructseq_to_server (const interop::wstructseq & test,
- CORBA::Short key
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (( CORBA::SystemException ))
-{
- CORBA::Boolean result = 1;
- for (CORBA::ULong i = 0; result && i < test.length(); i++)
- {
- result = this->wstruct_to_server(test[i], key ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- }
- return result;
-}
-
-interop::wstructseq *
-interop_WChar_Passer_i::wstructseq_from_server (CORBA::Short key
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC (( CORBA::SystemException ))
-{
- interop::wstructseq_var wsListI = new interop::wstructseq();
- wsListI->length(5);
-
- for (CORBA::ULong i = 0; i < wsListI->length(); i++)
- {
- wsListI[i].st_char = this->wchar_from_server(key ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- wsListI[i].st_string = this->wstring_from_server(key ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
- ref_.assign_warray (key, wsListI[i].st_array);
- // this is to keep Cxx on TRUE64 happy
- // it won't cast a wide character literal (i.e. L"")
- // to a CORBA::WChar *. +
- // {I wonder if sizeof(wchar_t) != sizeof (CORBA::WChar)?}
- const CORBA::WChar empty_wstring[] = {0};
- wsListI[i].st_any <<= CORBA::wstring_dup(empty_wstring);
- }
- return wsListI._retn();
+ return ws;
}
CORBA::Boolean
interop_WChar_Passer_i::wunion_to_server (const interop::wunion & test,
CORBA::Short key
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC (( CORBA::SystemException ))
{
switch (test._d()) {
case interop::is_wchar :
- return this->wchar_to_server (test.u_char(),key ACE_ENV_ARG_PARAMETER);
+ return this->wchar_to_server (test.u_char(),key);
case interop::is_wstring :
- return this->wstring_to_server (test.u_string(),key ACE_ENV_ARG_PARAMETER);
+ return this->wstring_to_server (test.u_string(),key);
case interop::is_warray :
- return this->warray_to_server (test.u_array(),key ACE_ENV_ARG_PARAMETER);
- default:
- /*return 0*/;
+ return this->warray_to_server (test.u_array(),key);
+ default:;
}
return 0;
}
@@ -207,7 +164,7 @@ interop_WChar_Passer_i::wunion_from_server (CORBA::Short key,
CORBA::Boolean
interop_WChar_Passer_i::any_to_server (const CORBA::Any &test,
CORBA::Short key
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC (( CORBA::SystemException ))
{
CORBA::WChar wc;
@@ -217,15 +174,15 @@ interop_WChar_Passer_i::any_to_server (const CORBA::Any &test,
if (test >>= CORBA::Any::to_wchar(wc))
{
- return this->wchar_to_server(wc,key ACE_ENV_ARG_PARAMETER);
+ return this->wchar_to_server(wc,key);
}
else if (test >>= ws)
{
- return this->wstring_to_server (ws,key ACE_ENV_ARG_PARAMETER);
+ return this->wstring_to_server (ws,key);
}
else if (test >>= forany)
{
- return this->warray_to_server (forany.in(),key ACE_ENV_ARG_PARAMETER);
+ return this->warray_to_server (forany.in(),key);
}
return 0;
}
@@ -269,7 +226,7 @@ interop_WChar_Passer_i::exception_test ( CORBA::Short key
interop::WChar_Passer::WStringException))
{
ACE_THROW (interop::WChar_Passer::WStringException(ref_.get_except(key),
- this->wchar_from_server(key ACE_ENV_ARG_PARAMETER)));
+ this->wchar_from_server(key)));
}
void