[Freeipa-devel] [PATCH] 192 Replace float with Decimal

Rich Megginson rmeggins at redhat.com
Fri Jan 13 23:41:58 UTC 2012


On 01/13/2012 01:02 PM, Martin Kosek wrote:
> This patch fixes RHEL 6.2 build issue.
> ----
> Having float type as a base type for floating point parameter in
> ipalib introduces several issues, e.g. problem with representation
> or value comparison. Python language provides Decimal type which
> help overcome these issue.
>
> This patch replaces a float type with Decimal type in Float
> parameter. A precision attribute was added to Float parameter that
> can be used to limit a number of decimal places in parameter
> representation. This approach fixes a problem with API.txt
> validation where comparison of float values may fail on different
> architectures due to float representation error.
>
> In order to safely transfer the parameter value over RPC it is
> being converted to string which is then converted back to Decimal
> number on server side.
>
> https://fedorahosted.org/freeipa/ticket/2260
works for me - ./makeapi --validate passes in make - using RHEL 6.2
>
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120113/0bf80a32/attachment.htm>


More information about the Freeipa-devel mailing list