diff options
author | gokhale <asgokhale@users.noreply.github.com> | 1998-04-19 01:23:06 +0000 |
---|---|---|
committer | gokhale <asgokhale@users.noreply.github.com> | 1998-04-19 01:23:06 +0000 |
commit | cc976497e45fbc1add821f6e513233ea5e06ad46 (patch) | |
tree | 06f49d92d4ea3ff32e9f1017d5be718402e725d2 | |
parent | 17493c21956eb57feed3c9e3970fc8e3d3bd7661 (diff) | |
download | ATCD-cc976497e45fbc1add821f6e513233ea5e06ad46.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_structure.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Any.cpp | 20 |
6 files changed, 23 insertions, 13 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index dc337133861..dbec4e409bc 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,11 @@ +Sat Apr 18 20:21:24 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu> + + * TAO_IDL/be/{be_visitor_exception, be_visitor_sequence, + be_visitor_structure, be_visitor_union}.cpp: In the generated code + for the >>= operators, we were incorrectly passing the address of + the pointer to the decode method rather than simply passing the + pointer. + Sat Apr 18 15:52:20 1998 Alexander Babu Arulanthu <alex@merengue.cs.wustl.edu> * tao/Exception.cpp (CORBA_Exception): Removed a debugging diff --git a/TAO/TAO_IDL/be/be_visitor_exception.cpp b/TAO/TAO_IDL/be/be_visitor_exception.cpp index 5caa004b73b..028ab2fd0a9 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception.cpp @@ -439,7 +439,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) << "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());" << be_nl << "if (stream.decode (" << node->tc_name () - << ", &_tao_elem, 0, _tao_env)" << be_nl + << ", _tao_elem, 0, _tao_env)" << be_nl << " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl << "{" << be_idt_nl << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), " diff --git a/TAO/TAO_IDL/be/be_visitor_sequence.cpp b/TAO/TAO_IDL/be/be_visitor_sequence.cpp index 7df6f018bd6..ea8d4c6b015 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence.cpp @@ -1169,7 +1169,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) << "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());" << be_nl << "if (stream.decode (" << node->tc_name () - << ", &_tao_elem, 0, _tao_env)" << be_nl + << ", _tao_elem, 0, _tao_env)" << be_nl << " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl << "{" << be_idt_nl << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), " diff --git a/TAO/TAO_IDL/be/be_visitor_structure.cpp b/TAO/TAO_IDL/be/be_visitor_structure.cpp index 85d12c4eb92..143f1687f33 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure.cpp @@ -314,7 +314,7 @@ int be_visitor_structure_cs::visit_structure (be_structure *node) << "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());" << be_nl << "if (stream.decode (" << node->tc_name () - << ", &_tao_elem, 0, _tao_env)" << be_nl + << ", _tao_elem, 0, _tao_env)" << be_nl << " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl << "{" << be_idt_nl << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), " diff --git a/TAO/TAO_IDL/be/be_visitor_union.cpp b/TAO/TAO_IDL/be/be_visitor_union.cpp index c36f7ea199b..f017abe8ea1 100644 --- a/TAO/TAO_IDL/be/be_visitor_union.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union.cpp @@ -575,7 +575,7 @@ int be_visitor_union_cs::visit_union (be_union *node) << "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());" << be_nl << "if (stream.decode (" << node->tc_name () - << ", &_tao_elem, 0, _tao_env)" << be_nl + << ", _tao_elem, 0, _tao_env)" << be_nl << " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl << "{" << be_idt_nl << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), " diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 8a67959ca41..d5115157963 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -50,7 +50,10 @@ CORBA_Any::type (void) const const void * CORBA_Any::value (void) const { - return this->value_; + if (this->any_owns_data_) + return this->cdr_; + else + return this->value_; } // Default "Any" constructor -- initializes to nulls per the @@ -659,18 +662,18 @@ CORBA_Any_var::operator= (const CORBA::Any_var& r) // supported only for standard data types. void -CORBA_Any::dump (const CORBA::Any any_value) +CORBA_Any::dump (const CORBA::Any any_value) { // Get the type. CORBA::TypeCode_ptr type = any_value.type (); - - if (type == CORBA::_tc_null) + + if (type == CORBA::_tc_null) ACE_DEBUG ((LM_DEBUG,"Null\n")); else if (type == CORBA::_tc_void) ACE_DEBUG ((LM_DEBUG,"Void\n")); - - else if (type == CORBA::_tc_short) + + else if (type == CORBA::_tc_short) { CORBA::Short s; any_value >>= s; @@ -727,7 +730,6 @@ CORBA_Any::dump (const CORBA::Any any_value) any_value >>= str; ACE_DEBUG ((LM_DEBUG, "String %s\n", str)); } - else + else ACE_DEBUG ((LM_DEBUG, "TCKind %d", type->kind_)); -} - +} |