diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2012-09-22 01:05:29 -0400 |
---|---|---|
committer | Alan Antonuk <aega@med.umich.edu> | 2012-10-04 10:40:16 -0400 |
commit | 4db29ffd997388c19863c3840f8c69385ad33ea0 (patch) | |
tree | 21f6016b7c6bd6ce47ec30a328111ddcd7b1a388 /librabbitmq/codegen.py | |
parent | 08fbbed79a3963320f9f3b850302afa095c0b348 (diff) | |
download | rabbitmq-c-github-ask-4db29ffd997388c19863c3840f8c69385ad33ea0.tar.gz |
Python 3.x support in codegen.py (via 2to3)
Changes to librabbitmq/codegen.py to support Python3
Upstream changes to rabbitmq-codegen/amqp_codegen.py
to support Python3
Diffstat (limited to 'librabbitmq/codegen.py')
-rw-r--r-- | librabbitmq/codegen.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py index 42d039d..4e26666 100644 --- a/librabbitmq/codegen.py +++ b/librabbitmq/codegen.py @@ -29,6 +29,7 @@ # ***** END LICENSE BLOCK ***** from __future__ import nested_scopes +from __future__ import division from amqp_codegen import * import string @@ -633,7 +634,7 @@ AMQP_CALL amqp_encode_properties(uint16_t class_id, for f in c.fields: if index % 16 == 15: index = index + 1 - shortnum = index / 16 + shortnum = index // 16 partialindex = 15 - (index % 16) bitindex = shortnum * 16 + partialindex print '#define %s (1 << %d)' % (cFlagName(c, f), bitindex) |