summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-05 22:32:58 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-05 22:32:58 +0000
commitda447bfbebc8384991657fc45a04beed0519898c (patch)
tree06ec7c1e8c34081cfecf80f59a0fa258c6bd4d3b
parent4baa969c5bb1ddef83eb1d4e98c73eb373ace81d (diff)
downloadATCD-da447bfbebc8384991657fc45a04beed0519898c.tar.gz
Further fixes to Any extraction to pointer to const.
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp8
4 files changed, 11 insertions, 6 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
index 3dbc8d114cb..f99e7fe0e62 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
@@ -173,7 +173,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node)
<< "}" << be_nl
<< "else" << be_nl // decode failed
<< "{" << be_idt_nl
- << "delete _tao_elem;" << be_nl
+ << "delete ACE_const_cast (" << node->name ()
+ << " *, _tao_elem);" << be_nl
<< "_tao_elem = 0;" << be_uidt_nl
<< "}" << be_uidt_nl
<< "}" << be_uidt_nl
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 47cd0921ec4..d40e4c152f0 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
@@ -178,7 +178,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< "}" << be_nl
<< "else" << be_nl // decode failed
<< "{" << be_idt_nl
- << "delete _tao_elem;" << be_nl
+ << "delete ACE_const_cast (" << node->name ()
+ << " *, _tao_elem);" << be_nl
<< "_tao_elem = 0;" << be_uidt_nl
<< "}" << be_uidt_nl
<< "}" << be_uidt_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 6f78e77f1f4..b2f7c4590ba 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
@@ -173,7 +173,8 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node)
<< "}" << be_nl
<< "else" << be_nl
<< "{" << be_idt_nl
- << "delete (" << node->name () << " *)_tao_elem;" << be_nl
+ << "delete ACE_const_cast (" << node->name ()
+ << " *, _tao_elem);" << be_nl
<< "_tao_elem = 0;" << be_uidt_nl
<< "}" << be_uidt_nl
<< "}" << be_uidt_nl
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 dfb84ee231d..399f3e55921 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
@@ -169,7 +169,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node)
<< "}" << be_nl
<< "ACE_CATCHANY" << be_nl
<< "{" << be_idt_nl
- << "delete _tao_elem;" << be_nl
+ << "delete ACE_const_cast (" << node->name ()
+ << " *, _tao_elem);" << be_nl
<< "_tao_elem = 0;" << be_uidt_nl
<< "}" << be_nl
<< "ACE_ENDTRY;" << be_nl
@@ -268,7 +269,7 @@ gen_extraction (TAO_OutStream *os,
<< "((CORBA::Any *)&_tao_any)->_tao_replace (" << be_idt << be_idt_nl
<< node->tc_name () << "," << be_nl
<< "1," << be_nl
- << "_tao_elem," << be_nl
+ << "ACE_reinterpret_cast (void *, _tao_elem)," << be_nl
<< "ACE_TRY_ENV" << be_uidt_nl
<< ");" << be_uidt_nl
<< "ACE_TRY_CHECK;" << be_nl;
@@ -284,7 +285,8 @@ gen_const_extraction (TAO_OutStream *os,
<< "((CORBA::Any *)&_tao_any)->_tao_replace (" << be_idt << be_idt_nl
<< node->tc_name () << "," << be_nl
<< "1," << be_nl
- << "_tao_elem," << be_nl
+ << "ACE_reinterpret_cast (void *, ACE_const_cast ("
+ << node->name () << " *, _tao_elem))," << be_nl
<< "ACE_TRY_ENV" << be_uidt_nl
<< ");" << be_uidt_nl
<< "ACE_TRY_CHECK;" << be_nl;