Andrew Edem
2007-04-26 05:33:01 UTC
Hello,
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])
Since in the 3.0 version the TypeCode_objref is used to construct type
codes for several different values of TCKind.
Can anyone confirm that this change is safe?
Thanks,
-Andrew
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])
Since in the 3.0 version the TypeCode_objref is used to construct type
codes for several different values of TCKind.
Can anyone confirm that this change is safe?
Thanks,
-Andrew