You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2017/07/19 19:41:00 UTC

[jira] [Updated] (PROTON-1160) [Python binding] decimal32 and decimal64 are sent byte reversed

     [ https://issues.apache.org/jira/browse/PROTON-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Ross updated PROTON-1160:
--------------------------------
    Fix Version/s:     (was: 0.18.0)
                   0.19.0

> [Python binding] decimal32 and decimal64 are sent byte reversed
> ---------------------------------------------------------------
>
>                 Key: PROTON-1160
>                 URL: https://issues.apache.org/jira/browse/PROTON-1160
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>             Fix For: 0.19.0
>
>
> When sending {{decimal32}} and {{decimal64}} types to or from the Python binding, the byte order of the numbers are reversed. This does not apply to the {{decimal128}} type.
> It is noteworthy that this bug was exposed by qpid-interop-test when run against the C++ binding.  In C++, these types are all based on a byte array, whereas in the Python binding, {{decimal32}} and {{decimal64}} are derived from Python types {{int}} and {{long}} respectively, while {{decimal128}} is derived from Python type {{bytes}}.
> Decimal32:
> {noformat}
>     sent:['0x00000000', '0x40490fdb', '0xc02df854', '0xff7fffff']
> received:['0x00000000', '0xdb0f4940', '0x54f82dc0', '0xffff7fff']
> {noformat}
> Decimal64:
> {noformat}
>     sent:['0x0000000000000000', '0x400921fb54442eea', '0xc005bf0a8b145fcf', '0xffefffffffffffff']
> received:['0x0000000000000000', '0xea2e4454fb210940', '0xcf5f148b0abf05c0', '0xffffffffffffefff']
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org