Rev 4206: Fix old pyrex compatibility ? in file:///home/vila/src/bzr/experimental/gc-py-bbc/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Mar 30 11:51:12 BST 2009
At file:///home/vila/src/bzr/experimental/gc-py-bbc/
------------------------------------------------------------
revno: 4206
revision-id: v.ladeuil+lp at free.fr-20090330105111-o70nhfgh9zslbrjq
parent: v.ladeuil+lp at free.fr-20090330075612-4t9rwwngy2kiekd2
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: groupcompress-python-only
timestamp: Mon 2009-03-30 12:51:11 +0200
message:
Fix old pyrex compatibility ?
* bzrlib/_groupcompress_pyx.pyx:
'|=' is not supported.
-------------- next part --------------
=== modified file 'bzrlib/_groupcompress_pyx.pyx'
--- a/bzrlib/_groupcompress_pyx.pyx 2009-03-27 22:44:25 +0000
+++ b/bzrlib/_groupcompress_pyx.pyx 2009-03-30 10:51:11 +0000
@@ -417,13 +417,13 @@
# We take off 1, because we have to be able to decode the non-expanded byte
num_low_bytes = PyString_GET_SIZE(bytes) - 1
while (c_bytes[offset] & 0x80) and offset < num_low_bytes:
- val |= (c_bytes[offset] & 0x7F) << shift
+ val = val | ((c_bytes[offset] & 0x7F) << shift)
shift = shift + 7
offset = offset + 1
if c_bytes[offset] & 0x80:
raise ValueError('Data not properly formatted, we ran out of'
' bytes before 0x80 stopped being set.')
- val |= c_bytes[offset] << shift
+ val = val | (c_bytes[offset] << shift)
offset = offset + 1
if val < 0:
uval = <unsigned int> val
More information about the bazaar-commits
mailing list