diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2014-01-23 19:25:49 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2014-01-23 19:25:49 +0000 |
commit | a8dd667129f79918617dc6eb3098d68fac08520d (patch) | |
tree | d01349d3b5d2c4f3923b87038edbe493b9d928ab /TAO/TAO_IDL/be | |
parent | cee89a7ac47fb0fa68c08b404080d48574d42b71 (diff) | |
download | ATCD-a8dd667129f79918617dc6eb3098d68fac08520d.tar.gz |
Thu Jan 23 19:02:29 UTC 2014 Phil Mesnier <mesnier_p@ociweb.com>
* TAO_IDL/be/be_visitor_argument/arglist.cpp:
The initializer for forward defined valuetypes used as members of
other values added a "const " to the type definition whereas the
initializer for fully defined valuetypes did not. This syntax seems
to have existed since support for object by value was first added
to TAO. A bug in name scope resolution actually hid this bug,
causing the compiler to treat forward defined valuetypes the same as
regular valutypes and getting the proper code generated. When the
scoping bug was fixed, forward defined valuetypes were distinguished
and got the bad implementation. Thanks to Colin Shen <cshen AT manh
DOT com> for reporting this age-old bug.
* TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp:
The marshalling code for forwarded valuetypes was similarly
whacky and uncompilable.
* tests/IDL_Test/fwd.idl:
Add a regression test for the above.
* tao/Valuetype/Valuetype.mpc:
* tests/IDL_Test/IDL_Test.mpc:
* tests/IDL_Test/string_value.idl:
Generate StringValueA.* so that IDL code that includes
StringValue.pidl will be able to compile. Also added a test for
this case too. Thanks again to Colin Shen for reporting this bug.
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp index f579b6a4de7..8426d0b27f2 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp @@ -437,7 +437,7 @@ int be_visitor_args_arglist::visit_valuetype_fwd (be_valuetype_fwd *node) switch (this->direction ()) { case AST_Argument::dir_IN: - *os << "const " << this->type_name (node) << " *"; + *os << this->type_name (node) << " *"; break; case AST_Argument::dir_INOUT: *os << this->type_name (node) << " *&"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp index 51df7b708a5..a0ca7c51c37 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_cs.cpp @@ -408,11 +408,11 @@ be_visitor_valuetype_field_cdr_cs::visit_valuetype_fwd (be_valuetype_fwd *) { case TAO_CodeGen::TAO_CDR_INPUT: *os << "(strm >> " << this->pre_ << f->local_name () - << this->post_ << ").out ()"; + << this->post_ << ".out ())"; break; case TAO_CodeGen::TAO_CDR_OUTPUT: *os << "(strm << " << this->pre_ << f->local_name () - << this->post_ << ").in ()"; + << this->post_ << ".in ())"; break; case TAO_CodeGen::TAO_CDR_SCOPE: // Nothing to be done because a valuetype cannot be declared inside a |