summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-09 21:21:36 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-09 21:21:36 +0000
commit51312c6a48cf421ffeceec6046b64192b89b0778 (patch)
tree413457c31b020be3b15bbb14e32867cb67b08ee2
parentfa04bb7443a1e2e6ee5ea1e3088eb48bf76ab546 (diff)
downloadATCD-51312c6a48cf421ffeceec6046b64192b89b0778.tar.gz
ChangeLogTag: Tue Dec 9 15:17:47 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp11
2 files changed, 14 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 0d6866f543b..2de9afeac44 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Tue Dec 9 15:17:47 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_valuetype/field_cs.cpp (visit_union):
+
+ Fixed code generation for accessors/mutators to a union as a
+ member of a valuetype. The previous, incorrect code assumed that
+ the member is declared as a union_var, which is not the case.
+ Thanks to Andy Bellafaire <Andy_M_Bellafaire@raytheon.com> for
+ pointing out the problem.
+
Tue Dec 9 14:07:28 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_operation/operation.cpp (gen_stub_operation_body);
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
index 45aa6f7dd11..afc9a49771f 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
@@ -1105,11 +1105,8 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node)
*os << "::" << ub->local_name ()
<< " (const " << bt->name () << " &val)" << be_nl
<< "{" << be_idt_nl;
- *os << "ACE_NEW (" << be_idt << be_idt_nl
- << "this->" << bu->field_pd_prefix () << ub->local_name ()
- << bu->field_pd_postfix () << "_var," << be_nl
- << bt->name () << " (val)" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl;
+ *os << "this->" << bu->field_pd_prefix () << ub->local_name ()
+ << bu->field_pd_postfix () << " = val;" << be_uidt_nl;
*os << "}" << be_nl;
*os << "// Readonly get method." << be_nl
@@ -1120,7 +1117,7 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node)
*os << "::" << ub->local_name () << " (void) const" << be_nl
<< "{" << be_idt_nl
- << "return *this->"
+ << "return this->"
<< bu->field_pd_prefix () << ub->local_name ()
<< bu->field_pd_postfix ()
<< ";" << be_uidt_nl
@@ -1134,7 +1131,7 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node)
*os << "::" << ub->local_name () << " (void)" << be_nl
<< "{" << be_idt_nl
- << "return *this->"
+ << "return this->"
<< bu->field_pd_prefix () << ub->local_name ()
<< bu->field_pd_postfix ()
<< ";" << be_uidt_nl