You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Kim van der Riet (JIRA)" <ji...@apache.org> on 2019/05/02 11:39:00 UTC

[jira] [Created] (PROTON-2038) [Python] ubyte (and other unsigned types) can hold negative value

Kim van der Riet created PROTON-2038:
----------------------------------------

             Summary: [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


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.



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

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