summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
index 525829db28e..5e3445f3f77 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
@@ -130,8 +130,6 @@ TAO::be_visitor_struct_typecode::visit (AST_Structure * node,
static char const StringType[] = "char const *";
static char const TypeCodeType[] = "::CORBA::TypeCode_ptr const *";
static char const MemberArrayType[] = "TAO::TypeCode::Struct_Field";
-// "TAO::TypeCode::Struct_Field<char const *, "
-// "::CORBA::TypeCode_ptr const *> const *";
// Generate the TypeCode instantiation.
os << "static ";
@@ -190,9 +188,24 @@ TAO::be_visitor_struct_typecode::gen_member_typecodes (AST_Structure * node)
be_type * const member_type =
be_type::narrow_from_decl ((*member_ptr)->field_type ());
- if (this->is_typecode_generation_required (member_type))
+ if (this->is_typecode_generation_required (member_type)
+ && member_type->accept (this) != 0)
{
- (void) member_type->accept (this);
+ return -1;
+ }
+
+ be_structure *bs = be_structure::narrow_from_decl (node);
+ if (bs)
+ {
+ be_visitor_typecode_defn::QNode const * const qnode =
+ this->queue_lookup (this->tc_queue_, bs);
+
+ ACE_Unbounded_Queue<AST_Type *> recursion_queue;
+ if (qnode
+ && member_type->in_recursion (recursion_queue))
+ {
+ this->is_recursive_ = true;
+ }
}
}