summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-26 19:32:57 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-26 19:32:57 +0000
commit0494cb8d2870be9bfb40327e6f0179f3699b9ecc (patch)
tree8e41c1a4d118b8ec9311f1a4e9901e9a34825485
parent3f66e17352ae90d2ce899ee695131c14d8252e34 (diff)
downloadATCD-0494cb8d2870be9bfb40327e6f0179f3699b9ecc.tar.gz
ChangeLogTag:Fri Jun 26 14:20:58 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-98c36
-rw-r--r--TAO/TAO_IDL/be/be_array.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_enum.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_exception.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_interface_fwd.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_native.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_predefined_type.cpp18
-rw-r--r--TAO/TAO_IDL/be/be_sequence.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_string.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_structure.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_type.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_typedef.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_union.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp32
-rw-r--r--TAO/TAO_IDL/be_include/be_array.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_enum.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_exception.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_interface.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_interface_fwd.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_native.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_predefined_type.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_sequence.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_string.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_structure.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_type.h11
-rw-r--r--TAO/TAO_IDL/be_include/be_typedef.h4
-rw-r--r--TAO/TAO_IDL/be_include/be_union.h4
-rw-r--r--TAO/tao/Sequence.cpp7
-rw-r--r--TAO/tao/Sequence.h3
30 files changed, 74 insertions, 174 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 9098884dc53..7239e1d8441 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,39 @@
+Fri Jun 26 14:20:58 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
+
+ * tao/Sequence.h:
+ * tao/Sequence.cpp:
+ * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp:
+ TAO provides an extension for octet sequences: a constructor
+ taking a Message_Block.
+
+ * TAO_IDL/be_include/be_array.h:
+ * TAO_IDL/be_include/be_enum.h:
+ * TAO_IDL/be_include/be_exception.h:
+ * TAO_IDL/be_include/be_interface.h:
+ * TAO_IDL/be_include/be_interface_fwd.h:
+ * TAO_IDL/be_include/be_native.h:
+ * TAO_IDL/be_include/be_predefined_type.h:
+ * TAO_IDL/be_include/be_sequence.h:
+ * TAO_IDL/be_include/be_string.h:
+ * TAO_IDL/be_include/be_structure.h:
+ * TAO_IDL/be_include/be_type.h:
+ * TAO_IDL/be_include/be_typedef.h:
+ * TAO_IDL/be_include/be_union.h:
+ * TAO_IDL/be/be_array.cpp:
+ * TAO_IDL/be/be_enum.cpp:
+ * TAO_IDL/be/be_exception.cpp:
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_interface_fwd.cpp:
+ * TAO_IDL/be/be_native.cpp:
+ * TAO_IDL/be/be_predefined_type.cpp:
+ * TAO_IDL/be/be_sequence.cpp:
+ * TAO_IDL/be/be_string.cpp:
+ * TAO_IDL/be/be_structure.cpp:
+ * TAO_IDL/be/be_type.cpp:
+ * TAO_IDL/be/be_typedef.cpp:
+ * TAO_IDL/be/be_union.cpp:
+ Removed a method that was not used anymore.
+
Fri Jun 26 12:54:25 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
* TAO_IDL/be/be_visitor_operation/{rettype_post_docall_cs,
diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp
index 967bfb0042c..1b80c106526 100644
--- a/TAO/TAO_IDL/be/be_array.cpp
+++ b/TAO/TAO_IDL/be/be_array.cpp
@@ -1095,13 +1095,6 @@ be_array::compute_size_type (void)
return 0;
}
-int be_array::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name () << "_slice *";
- return 0;
-}
-
int
be_array::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_enum.cpp b/TAO/TAO_IDL/be/be_enum.cpp
index c9e0ea40463..943d356870b 100644
--- a/TAO/TAO_IDL/be/be_enum.cpp
+++ b/TAO/TAO_IDL/be/be_enum.cpp
@@ -174,13 +174,6 @@ be_enum::tc_encap_len (void)
return this->encap_len_;
}
-int be_enum::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name ();
- return 0;
-}
-
int
be_enum::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp
index 2cd3481e22b..667e7916612 100644
--- a/TAO/TAO_IDL/be/be_exception.cpp
+++ b/TAO/TAO_IDL/be/be_exception.cpp
@@ -176,13 +176,6 @@ be_exception::tc_encap_len (void)
return this->encap_len_;
}
-int be_exception::write_as_return (TAO_OutStream *,
- be_type *)
-{
- // exceptions cannot be returned
- return -1;
-}
-
int
be_exception::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 79398cd9cea..b620ea47d27 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -1343,13 +1343,6 @@ be_interface::accept (be_visitor *visitor)
return visitor->visit_interface (this);
}
-int be_interface::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name () << "_ptr";
- return 0;
-}
-
// Narrowing
IMPL_NARROW_METHODS3 (be_interface, AST_Interface, be_scope, be_type)
IMPL_NARROW_FROM_DECL (be_interface)
diff --git a/TAO/TAO_IDL/be/be_interface_fwd.cpp b/TAO/TAO_IDL/be/be_interface_fwd.cpp
index 60bf5bf37f3..52cc4622ff3 100644
--- a/TAO/TAO_IDL/be/be_interface_fwd.cpp
+++ b/TAO/TAO_IDL/be/be_interface_fwd.cpp
@@ -505,13 +505,6 @@ be_interface_fwd::tc_size (void)
return 0;
}
-int be_interface_fwd::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name () << "_ptr";
- return 0;
-}
-
int
be_interface_fwd::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_native.cpp b/TAO/TAO_IDL/be/be_native.cpp
index bf2af0a6eb8..eb86680262e 100644
--- a/TAO/TAO_IDL/be/be_native.cpp
+++ b/TAO/TAO_IDL/be/be_native.cpp
@@ -50,14 +50,6 @@ be_native::tc_size (void)
}
int
-be_native::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name ();
- return 0;
-}
-
-int
be_native::accept (be_visitor *visitor)
{
return visitor->visit_native (this);
diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp
index 40c9d8595b7..baede491bfe 100644
--- a/TAO/TAO_IDL/be/be_predefined_type.cpp
+++ b/TAO/TAO_IDL/be/be_predefined_type.cpp
@@ -434,24 +434,6 @@ be_predefined_type::compute_size_type (void)
return 0;
}
-int be_predefined_type::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name ();
- // check if the type is an any
- if (this->pt () == AST_PredefinedType::PT_any)
- {
- // if it is an any, return a pointer to it
- *stream << " *";
- }
- else if (this->pt () == AST_PredefinedType::PT_pseudo)
- {
- // pseudo object, return a pointer
- *stream << "_ptr";
- }
- return 0;
-}
-
int
be_predefined_type::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp
index f52c40ed49c..3dc417f7ee2 100644
--- a/TAO/TAO_IDL/be/be_sequence.cpp
+++ b/TAO/TAO_IDL/be/be_sequence.cpp
@@ -308,13 +308,6 @@ be_sequence::decl (void)
return this;
}
-int be_sequence::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name () << " *";
- return 0;
-}
-
int
be_sequence::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp
index ffc90137311..565bc77ec08 100644
--- a/TAO/TAO_IDL/be/be_string.cpp
+++ b/TAO/TAO_IDL/be/be_string.cpp
@@ -108,13 +108,6 @@ be_string::tc_encap_len (void)
return this->encap_len_;
}
-int be_string::write_as_return (TAO_OutStream *stream,
- be_type * /* type */)
-{
- *stream << "char* ";
- return 0;
-}
-
int
be_string::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp
index da3955e5425..98b0bac3928 100644
--- a/TAO/TAO_IDL/be/be_structure.cpp
+++ b/TAO/TAO_IDL/be/be_structure.cpp
@@ -708,17 +708,6 @@ be_structure::compute_size_type (void)
return 0;
}
-int be_structure::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name ();
- if (this->size_type () == be_decl::VARIABLE)
- {
- *stream << " *";
- }
- return 0;
-}
-
int
be_structure::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp
index d14a3da61e1..b9fb7bb5ea1 100644
--- a/TAO/TAO_IDL/be/be_type.cpp
+++ b/TAO/TAO_IDL/be/be_type.cpp
@@ -269,13 +269,6 @@ AST_Decl::NodeType be_type::base_node_type (void) const
return ACE_const_cast(be_type*, this)->node_type ();
}
-int be_type::write_as_return (TAO_OutStream *, be_type *)
-{
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_type::write_as_return - internal error,"
- " method shouldn't be invoked\n"), -1);
-}
-
int
be_type::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp
index 119903506d5..df95a3ebb45 100644
--- a/TAO/TAO_IDL/be/be_typedef.cpp
+++ b/TAO/TAO_IDL/be/be_typedef.cpp
@@ -176,13 +176,6 @@ AST_Decl::NodeType be_typedef::base_node_type (void) const
return base->base_node_type ();
}
-int be_typedef::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- be_type *base = be_type::narrow_from_decl (this->base_type ());
- return base->write_as_return (stream, type);
-}
-
int
be_typedef::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp
index 8f42dc2f4bc..ebaf03f2549 100644
--- a/TAO/TAO_IDL/be/be_union.cpp
+++ b/TAO/TAO_IDL/be/be_union.cpp
@@ -776,17 +776,6 @@ be_union::compute_size_type (void)
return 0;
}
-int be_union::write_as_return (TAO_OutStream *stream,
- be_type *type)
-{
- *stream << type->name ();
- if (this->size_type () == be_decl::VARIABLE)
- {
- *stream << " *";
- }
- return 0;
-}
-
int
be_union::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
index e7c4990acf2..8c6066b1466 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
@@ -288,6 +288,38 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
<< " &); // copy ctor" << be_nl;
*os << "~" << node->local_name () << " (void); // dtor\n";
+ // TAO provides extensions for octet sequences, first find out if
+ // the base type is an octet (or an alias for octet)
+ be_predefined_type *predef = 0;
+ if (bt->base_node_type () == AST_Type::NT_pre_defined)
+ {
+ be_typedef* alias =
+ be_typedef::narrow_from_decl (bt);
+
+ if (alias == 0)
+ {
+ predef = be_predefined_type::narrow_from_decl (bt);
+ }
+ else
+ {
+ predef = be_predefined_type::narrow_from_decl
+ (alias->primitive_base_type ());
+ }
+ }
+ // Now generate the extension...
+ if (predef != 0 && predef->pt () == AST_PredefinedType::PT_octet)
+ {
+ *os << "\n"
+ << "#if defined(TAO_NO_COPY_OCTET_SEQUENCES)" << be_nl
+ << node->local_name () << " (" << be_idt << be_idt_nl
+ << "CORBA::ULong length," << be_nl
+ << "const ACE_Message_Block* mb" << be_uidt_nl
+ << ")" << be_uidt_nl
+ << " : " << node->instance_name ()
+ << " (length, mb) {}" << "\n"
+ << "#endif /* TAO_NO_COPY_OCTET_SEQUENCE */\n\n";
+ }
+
os->decr_indent ();
*os << "};" << be_nl;
diff --git a/TAO/TAO_IDL/be_include/be_array.h b/TAO/TAO_IDL/be_include/be_array.h
index 2d47c20f846..b2e9dec8d73 100644
--- a/TAO/TAO_IDL/be_include/be_array.h
+++ b/TAO/TAO_IDL/be_include/be_array.h
@@ -75,10 +75,6 @@ public:
virtual long tc_encap_len (void);
// return length of encapsulation
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_enum.h b/TAO/TAO_IDL/be_include/be_enum.h
index 6196d5053aa..345f99620c1 100644
--- a/TAO/TAO_IDL/be_include/be_enum.h
+++ b/TAO/TAO_IDL/be_include/be_enum.h
@@ -54,10 +54,6 @@ public:
virtual int member_count (void);
// return the count of members
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_exception.h b/TAO/TAO_IDL/be_include/be_exception.h
index 1f9348e993a..118272d4065 100644
--- a/TAO/TAO_IDL/be_include/be_exception.h
+++ b/TAO/TAO_IDL/be_include/be_exception.h
@@ -36,10 +36,6 @@ public:
virtual int member_count (void);
// return the count of members
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h
index 14c70aa4110..ff6f2cc6146 100644
--- a/TAO/TAO_IDL/be_include/be_interface.h
+++ b/TAO/TAO_IDL/be_include/be_interface.h
@@ -111,10 +111,6 @@ public:
// Visiting
virtual int accept (be_visitor *visitor);
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Narrowing
DEF_NARROW_METHODS3 (be_interface, AST_Interface, be_scope, be_type);
DEF_NARROW_FROM_DECL (be_interface);
diff --git a/TAO/TAO_IDL/be_include/be_interface_fwd.h b/TAO/TAO_IDL/be_include/be_interface_fwd.h
index e14b051837a..db325a152bf 100644
--- a/TAO/TAO_IDL/be_include/be_interface_fwd.h
+++ b/TAO/TAO_IDL/be_include/be_interface_fwd.h
@@ -60,10 +60,6 @@ public:
virtual long tc_size (void);
// return typecode size
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor* visitor);
diff --git a/TAO/TAO_IDL/be_include/be_native.h b/TAO/TAO_IDL/be_include/be_native.h
index 869e17a0fca..e049c3d308c 100644
--- a/TAO/TAO_IDL/be_include/be_native.h
+++ b/TAO/TAO_IDL/be_include/be_native.h
@@ -44,10 +44,6 @@ public:
virtual long tc_size (void);
// return typecode size
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_predefined_type.h b/TAO/TAO_IDL/be_include/be_predefined_type.h
index 8d0aa7a44fd..1f34e5adf9d 100644
--- a/TAO/TAO_IDL/be_include/be_predefined_type.h
+++ b/TAO/TAO_IDL/be_include/be_predefined_type.h
@@ -55,10 +55,6 @@ public:
virtual long tc_encap_len (void);
// return length of encapsulation
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor* visitor);
diff --git a/TAO/TAO_IDL/be_include/be_sequence.h b/TAO/TAO_IDL/be_include/be_sequence.h
index 2fd6ba70385..5778f9c90fe 100644
--- a/TAO/TAO_IDL/be_include/be_sequence.h
+++ b/TAO/TAO_IDL/be_include/be_sequence.h
@@ -82,10 +82,6 @@ public:
virtual be_decl *decl (void);
// overridden method on the be_scope class
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_string.h b/TAO/TAO_IDL/be_include/be_string.h
index 983653f4824..7d1067d8d5c 100644
--- a/TAO/TAO_IDL/be_include/be_string.h
+++ b/TAO/TAO_IDL/be_include/be_string.h
@@ -52,10 +52,6 @@ public:
virtual long tc_encap_len (void);
// return length of encapsulation
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_structure.h b/TAO/TAO_IDL/be_include/be_structure.h
index 52fe361e00e..06d7ea5af1f 100644
--- a/TAO/TAO_IDL/be_include/be_structure.h
+++ b/TAO/TAO_IDL/be_include/be_structure.h
@@ -66,10 +66,6 @@ public:
virtual int member_count (void);
// return the count of members
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_type.h b/TAO/TAO_IDL/be_include/be_type.h
index 56e4acfd5c4..20caba78b32 100644
--- a/TAO/TAO_IDL/be_include/be_type.h
+++ b/TAO/TAO_IDL/be_include/be_type.h
@@ -65,17 +65,6 @@ public:
virtual const char *nested_type_name (be_decl *d, const char *suffix = 0);
// type name of a node used when generating declarations
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // Different types have different mappings as return values, for
- // instance interfaces are returned by reference (_ptr), but basic
- // types by value.
- // Typedefs are tricky, their mapping depend on the real type they
- // are aliasing, but the name should be the typedef name, hence
- // typedefs delegate on their base type, but pass their nodes down
- // so the real name can be generated; hence the <type> parameter.
- // This method writes the type as a return value on the stream.
-
virtual AST_Decl::NodeType base_node_type (void) const;
// Typedefs are tricky to handle, in many points their mapping
// depend on base type they are aliasing. Since typedefs can be
diff --git a/TAO/TAO_IDL/be_include/be_typedef.h b/TAO/TAO_IDL/be_include/be_typedef.h
index abc9d767b3b..83fcfd79160 100644
--- a/TAO/TAO_IDL/be_include/be_typedef.h
+++ b/TAO/TAO_IDL/be_include/be_typedef.h
@@ -57,10 +57,6 @@ public:
// Return the most "unaliased" type node for the base type (see
// be_type.h).
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/TAO_IDL/be_include/be_union.h b/TAO/TAO_IDL/be_include/be_union.h
index 55757b68030..332c92d44a0 100644
--- a/TAO/TAO_IDL/be_include/be_union.h
+++ b/TAO/TAO_IDL/be_include/be_union.h
@@ -68,10 +68,6 @@ public:
virtual int default_index (void);
// return the default index used
- virtual int write_as_return (TAO_OutStream *stream,
- be_type *type);
- // write the mapping as a return value on the stream.
-
// Visiting
virtual int accept (be_visitor *visitor);
diff --git a/TAO/tao/Sequence.cpp b/TAO/tao/Sequence.cpp
index 8e92469b21c..e84d5cb5eca 100644
--- a/TAO/tao/Sequence.cpp
+++ b/TAO/tao/Sequence.cpp
@@ -290,9 +290,10 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator= (const TAO_Unbounded_Sequence<CO
}
TAO_Unbounded_Sequence<CORBA::Octet>::
-TAO_Unbounded_Sequence (const ACE_Message_Block *mb)
- : TAO_Unbounded_Base_Sequence (mb->length (),
- mb->length (),
+TAO_Unbounded_Sequence (CORBA::Ulong length,
+ const ACE_Message_Block *mb)
+ : TAO_Unbounded_Base_Sequence (length,
+ length,
mb->rd_ptr (),
CORBA::B_FALSE),
mb_ (ACE_Message_Block::duplicate (mb))
diff --git a/TAO/tao/Sequence.h b/TAO/tao/Sequence.h
index 0f304b361f4..8b338138472 100644
--- a/TAO/tao/Sequence.h
+++ b/TAO/tao/Sequence.h
@@ -390,7 +390,8 @@ public:
~TAO_Unbounded_Sequence (void);
// see TAO_Unbounded_Sequence in "Sequence_T.h"
- TAO_Unbounded_Sequence<CORBA::Octet> (const ACE_Message_Block* mb);
+ TAO_Unbounded_Sequence<CORBA::Octet> (CORBA::ULong length,
+ const ACE_Message_Block* mb);
// Create a sequence of octets from a single message block (i.e. it
// ignores any chaining in the meesage block).