[omniORB] CORBA::TypeCode::member_label() bug
Douglas Kosovic
douglask@dstc.edu.au
Mon, 05 Jul 1999 12:53:48 +1000
This is a multi-part message in MIME format.
--------------A33C838A4406B9418BF44C1E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I just want to report a minor bug for
CORBA::TypeCode::member_label(CORBA::ULong i) for a IDL Union with a
default member.
The label returned by member_label for the default member should be the
zero octet (currently returns a zero label of the same kind as the
discriminator).
The attached patch should fix the problem.
Thanks,
Doug.
--------------A33C838A4406B9418BF44C1E
Content-Type: text/plain; charset=us-ascii;
name="member_label_patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="member_label_patch.txt"
*** src/lib/omniORB2/dynamic/typecode.cc Mon Jul 5 10:53:00 1999
--- newsrc/lib/omniORB2/dynamic/typecode.cc Mon Jul 5 10:53:50 1999
***************
*** 2903,2909 ****
{
CORBA::Any* a = new CORBA::Any;
if( !a ) _CORBA_new_operator_return_null();
! TypeCode_union_helper::insertLabel(*a, pd_members[i].alabel, pd_discrim_tc);
return a;
}
--- 2903,2916 ----
{
CORBA::Any* a = new CORBA::Any;
if( !a ) _CORBA_new_operator_return_null();
!
! if( i != pd_default ) {
! TypeCode_union_helper::insertLabel(*a, pd_members[i].alabel,
! pd_discrim_tc);
! } else {
! (*a) <<= CORBA::Any::from_octet((CORBA::Octet)0);
! }
!
return a;
}
--------------A33C838A4406B9418BF44C1E--