[omniORB] Promoting from integer to double in a union?
Jon K Hellan
hellan@acm.org
Mon, 20 Mar 2000 15:13:42 +0100
I am evaluating orbit-python, a set of Python bindings for ORBit, and
am hoping for help in interpreting the CORBA/Python standard.
In the code below, sc.cell_set_value expects the parameter types long,
long and GNOME::Gnumeric::Value. The discriminant
GNOME.Gnumeric.VALUE_FLOAT indicates a double value. So I am creating
a union with an integer value, but claiming that it is a double.
v=GNOME.Gnumeric.Value(GNOME.Gnumeric.VALUE_FLOAT, 1)
sc.cell_set_value(1, 1, v)
I didn't really expect this to work, but it does with Fnorb and
omniORB. On the other hand, with orbit-python I get an exception:
CORBA.SystemException: IDL:omg.org/CORBA/BAD_PARAM:1.0:
Expected float, got int
Fnorb and omniORB apparently promote the integer to double during
marshaling. Is this behaviour required by the standard, or was I just
lucky?
Regards
Jon K Hellan