diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-05-12 14:32:13 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-05-12 14:32:13 +0000 |
commit | 9791cd11529877c021a81591aaede5529ca8192a (patch) | |
tree | 85e84cadcb7e32e94890b673dc324b683603c839 | |
parent | 61619c9d43361e6bf7d3b42ba01cdf69a0737518 (diff) | |
download | ATCD-9791cd11529877c021a81591aaede5529ca8192a.tar.gz |
ChangeLogTag: Thu May 12 09:07:34 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 18 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Var_Array_SArgument_T.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Var_Array_Argument_T.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/IDL_Test/array.idl | 16 |
4 files changed, 38 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 8414784c205..5b55456df74 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,21 @@ +Thu May 12 09:07:34 2005 Jeff Parsons <j.parsons@vanderbilt.edu> + + * tao/Var_Array_Argument_T.cpp: + * tao/PortableServer/Var_Array_SArgument_T.cpp: + + Added explicit construction of T_forany class when passing + the associated T_slice* to an Any or CDR operator, in the + context of an OUT operation parameter. Implicit conversion + is ambiguous if there are two or more arrays with the + same element type. The explicit conversion is already in + place for all other parameter types. Thanks to Johnny Willemsen + <jwillemsen@remedy.nl> for uncovering this bug and for + supplying the example IDL checked in below. + + * tests/IDL_Test/array.idl: + + Added IDL to test for the bug described above. + Wed May 11 23:42:34 2005 Ossama Othman <ossama@dre.vanderbilt.edu> * TAO_IDL/be/be_visitor_typecode/value_typecode.cpp diff --git a/TAO/tao/PortableServer/Var_Array_SArgument_T.cpp b/TAO/tao/PortableServer/Var_Array_SArgument_T.cpp index 4936ccef430..8197c3fb819 100644 --- a/TAO/tao/PortableServer/Var_Array_SArgument_T.cpp +++ b/TAO/tao/PortableServer/Var_Array_SArgument_T.cpp @@ -79,7 +79,8 @@ TAO::Out_Var_Array_SArgument_T<S_slice,S_var,S_forany>::marshal ( TAO_OutputCDR & cdr ) { - return cdr << this->x_.ptr (); + S_forany tmp (this->x_.ptr ()); + return cdr << tmp; } #if TAO_HAS_INTERCEPTORS == 1 diff --git a/TAO/tao/Var_Array_Argument_T.cpp b/TAO/tao/Var_Array_Argument_T.cpp index 591995eb163..c6116ff80f1 100644 --- a/TAO/tao/Var_Array_Argument_T.cpp +++ b/TAO/tao/Var_Array_Argument_T.cpp @@ -104,7 +104,8 @@ void TAO::Out_Var_Array_Argument_T<S,S_slice,S_var,S_out,S_forany,S_tag>:: interceptor_param (Dynamic::Parameter & p) { - p.argument <<= this->x_; + S_forany tmp (this->x_); + p.argument <<= tmp; p.mode = CORBA::PARAM_OUT; } diff --git a/TAO/tests/IDL_Test/array.idl b/TAO/tests/IDL_Test/array.idl index 0fe126593b8..ef0805a27fe 100644 --- a/TAO/tests/IDL_Test/array.idl +++ b/TAO/tests/IDL_Test/array.idl @@ -107,3 +107,19 @@ interface testdata typedef sequence<ArrayDeChar> ArrayDeCharList; }; +// Tests for explicit conversion of slice pointer to the +// corresponding forany class before using CDR or Any +// operators. This is required because myvec2_slice and +// myvec3_slice are the same type, so implicit conversion +// from myvec2_slice (in the case below) could go to +// myvec2_forany or myvec3_forany. +module arraytest +{ + typedef string myvec2[2]; + typedef string myvec3[3]; + + interface MyTest + { + void test_method (out myvec2 mystring); + }; +}; |