summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-10 19:19:43 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-10 19:19:43 +0000
commit8aa1bb7286e78ce8097ade77333fb6d288c9647e (patch)
treedeb472714d8ff61eed8ad1240a86800ec3563d60
parent9e87bb34701afa08592005d44bec57d5972e25c1 (diff)
downloadATCD-8aa1bb7286e78ce8097ade77333fb6d288c9647e.tar.gz
ChangeLogTag: Thu May 10 14:12:42 2001 Jeff Parsons <parsons@cs.wustli.edu>
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
index 6c178833f3a..d1832e8f5b2 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
@@ -52,9 +52,9 @@ int
be_visitor_typecode_defn::visit_members (AST_Structure *node)
{
this->elem_number_ = 0;
-
AST_Field **member_ptr = 0;
size_t count = node->nfields ();
+ be_decl *enclosing = be_decl::narrow_from_decl (node);
for (size_t i = 0; i < count; ++i)
{
@@ -64,6 +64,11 @@ be_visitor_typecode_defn::visit_members (AST_Structure *node)
// Set the node to be visited.
this->ctx_->node (bd);
+
+ // Reset this with every iteration - it might be changed
+ // when it comes around again.
+ this->ctx_->scope (enclosing);
+
this->elem_number_++;
// Do any pre processing using the next item info.
@@ -2063,6 +2068,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node)
// hand over code generation to our type node
bt = be_type::narrow_from_decl (node->field_type ());
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED);
+
if (!bt || bt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,