[omniORB] bug in CORBA::Fixed constructor

Luke Deller ldeller at xplantechnology.com
Thu Dec 14 17:21:36 GMT 2006


Hi,

In omniORB (v4.1), the CORBA::Fixed constructor skips leading and
trailing zeros when constructing a fixed-point value from a string.
This behaviour also affects omniORBpy:

>>> CORBA.fixed('0123d').precision() # should be 4
3
>>> CORBA.fixed('12.340d').decimals() # should be 3
2

The code in corbaFixed.cc seems to do this quite deliberately, but I
think it is wrong:

Both the C++ and Python language mappings describe this string argument
with the phrase "the string representation of a fixed-point literal".
The CORBA specification (v2.6, sec 3.9.2) gives specific examples of
fixed-point literals, illustrating that leading and trailing zeroes are
significant.

Regards,
Luke.

**********************************************************************************************

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege.  If you are not
the intended recipient you must not use, distribute or copy this
email.  If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.

It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************




More information about the omniORB-list mailing list