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

Kim van der Riet updated PROTON-2038:
-------------------------------------
    Description: 
Python representations of:

proton.ubyte
 proton.ushort
 proton.uint
 proton.ulong

can hold a negative value, even though they should be unsigned.

{{import proton}}
 {{print proton.ubyte(-1)}}
 {{print proton.ushort(-1)}}
 {{print proton.uint(-1)}}
 {{print proton.ulong(-1)}}

results in

{{-1}}
 {{-1}}
 {{-1}}
 {{-1}}

 If an unsigned type containing a negative value is used in a message in any 
context, it throws an Overflow exception within Proton.

  was:
Python representations of:

proton.ubyte
 proton.ushort
 proton.uint
 proton.ulong

can hold a negative value, even though they should be unsigned.

{{import proton}}
 {{print proton.ubyte(-1)}}
 {{print proton.ushort(-1)}}
 {{print proton.uint(-1)}}
 {{print proton.ulong(-1)}}

results in

{{-1}}
 {{-1}}
 {{-1}}
 {{-1}}

 If a negative value is used in a message in any context, it throws an 
exception within Proton.


> [Python] ubyte (and other unsigned types) can hold negative value
> -----------------------------------------------------------------
>
>                 Key: PROTON-2038
>                 URL: https://issues.apache.org/jira/browse/PROTON-2038
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Major
>
> Python representations of:
> proton.ubyte
>  proton.ushort
>  proton.uint
>  proton.ulong
> can hold a negative value, even though they should be unsigned.
> {{import proton}}
>  {{print proton.ubyte(-1)}}
>  {{print proton.ushort(-1)}}
>  {{print proton.uint(-1)}}
>  {{print proton.ulong(-1)}}
> results in
> {{-1}}
>  {{-1}}
>  {{-1}}
>  {{-1}}
>  If an unsigned type containing a negative value is used in a message in any 
> context, it throws an Overflow exception within Proton.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to