[omniORB] bug in TypeCode implementation in omniORBpython 3.0
Duncan Grisby
duncan at grisby.org
Thu Apr 26 10:34:29 BST 2007
On Wednesday 25 April, Andrew Edem wrote:
> I've run into a strange problem with code that ran fine on omniORBpy 2.6
> but started misbehaving on omniORBpy 3.0. Basically I do a type
> comparison (operand is an Any):
>
> if operand.typecode().kind() != CORBA.tk_objref:
> raise CORBA.BAD_PARAM()
>
> Now, this breaks in omniORBpy 3.0 because kind() returns 14 instead of
> the TCKind enum value. I've traced this down to tcInternal.py, and it
> seems that in the TypeCode_objref (line 556 in the 3.0 version):
>
> self._k = desc[0]
>
> In this case desc[0] is the integer value of the enumeration.
> Origionally, the version 2.6 code had:
>
> self._k = CORBA.tk_objref
>
> Now, it seems like this should be changed for the version 3.0 code to:
>
> self._k = CORBA.TCKind._item(desc[0])
Yes, your fix is the right thing to do. I've checked it in to CVS.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list