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 2013/02/15 14:17:13 UTC
[jira] [Closed] (QPID-1383) Jython dislikes __cmp__ methods that
don't return ints
[ https://issues.apache.org/jira/browse/QPID-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Ross closed QPID-1383.
-----------------------------
Resolution: Won't Fix
This bug concerns the now deprecated old client api (replaced by the messaging api).
> Jython dislikes __cmp__ methods that don't return ints
> ------------------------------------------------------
>
> Key: QPID-1383
> URL: https://issues.apache.org/jira/browse/QPID-1383
> Project: Qpid
> Issue Type: Bug
> Components: Python Client
> Affects Versions: M3
> Environment: [jross@localhost jython2.5a3]$ ./jython --version
> Jython 2.5a3 (trunk:5315:5317, Sep 10 2008, 20:54:23)
> [IcedTea Server VM (Sun Microsystems Inc.)] on java1.7.0
> [jross@localhost jython2.5a3]$ uname -a
> Linux localhost.localdomain 2.6.25.14-69.fc8 #1 SMP Mon Aug 4 14:20:24 EDT 2008 i686 i686 i386 GNU/Linux
> [jross@localhost jython2.5a3]$ cat /etc/redhat-release
> Fedora release 8 (Werewolf)
> Reporter: Justin Ross
>
> Jython complains that Serial.__cmp__ does not return an int. In fact, it's returning a python "long int". Here's a fix:
> Index: python/qpid/datatypes.py
> ===================================================================
> --- python/qpid/datatypes.py (revision 704116)
> +++ python/qpid/datatypes.py (working copy)
> @@ -138,7 +138,7 @@
>
> delta = (self.value - other.value) & 0xFFFFFFFF
> neg = delta & 0x80000000
> - mag = delta & 0x7FFFFFFF
> + mag = int(delta & 0x7FFFFFFF)
>
> if neg:
> return -mag
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org