diff options
-rw-r--r-- | TAO/ChangeLog-98c | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp | 1 |
5 files changed, 18 insertions, 4 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index eabb7c005be..ec7e048d335 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,13 @@ +Wed Oct 28 21:47:32 1998 Jeff Parsons <jp4@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_enum/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_structure/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp: + Fixed <<= operators (copying version) to be + leak-free and consistent (now all use ACE_NEW + and return immediately if it fails). + Wed Oct 28 20:44:27 1998 Jeff Parsons <jp4@cs.wustl.edu> * tao/Any.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index d37f520ae80..a2e0525abed 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -59,6 +59,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) << node->name () << " *_any_val;" << be_nl << "ACE_NEW (_any_val, " << node->name () << " (_tao_elem));" << be_nl + << "if (!_any_val) return;" << be_nl << "TAO_TRY" << be_nl << "{" << be_idt_nl << "_tao_any.replace (" << node->tc_name () diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index 9a2f9be5f4f..ae287aeb8ed 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -57,13 +57,14 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << "const " << node->name () << " &_tao_elem" << be_uidt_nl << ") // copying" << be_uidt_nl << "{" << be_idt_nl - << node->name () << " *_tao_any_val = new " << node->name () - << " (_tao_elem);" << be_nl + << node->name () << " *_tao_any_val;" << be_nl + << "ACE_NEW (_tao_any_val, " << node->name () + << " (_tao_elem));" << be_nl << "if (!_tao_any_val) return;" << be_nl << "TAO_TRY" << be_nl << "{" << be_idt_nl - << "_tao_any.replace (" << node->tc_name () << ", new " - << node->name () << "(_tao_elem), 1, TAO_TRY_ENV);" + << "_tao_any.replace (" << node->tc_name () + << ", _tao_any_val, 1, TAO_TRY_ENV);" << " // copy the value" << be_nl << "TAO_CHECK_ENV; " << be_uidt_nl << "}" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index 07a15708baf..10937532f50 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -58,6 +58,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "{" << be_idt_nl << node->name () << " *_any_val;" << be_nl << "ACE_NEW (_any_val, " << node->name () << " (_tao_elem));" << be_nl + << "if (!_any_val) return;" << be_nl << "TAO_TRY" << be_nl << "{" << be_idt_nl << "_tao_any.replace (" << node->tc_name () diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index 212a226e90c..02b7538cfe8 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -57,6 +57,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "{" << be_idt_nl << node->name () << " *_any_val;" << be_nl << "ACE_NEW (_any_val, " << node->name () << " (_tao_elem));" << be_nl + << "if (!_any_val) return;" << be_nl << "TAO_TRY" << be_nl << "{" << be_idt_nl << "_tao_any.replace (" << node->tc_name () |