[pypy-commit] pypy virtual-arguments: more of the same
fijal
noreply at buildbot.pypy.org
Thu Jul 19 18:18:35 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56227:08d919b041ca
Date: 2012-07-19 18:18 +0200
http://bitbucket.org/pypy/pypy/changeset/08d919b041ca/
Log: more of the same
diff --git a/pypy/module/unicodedata/interp_ucd.py b/pypy/module/unicodedata/interp_ucd.py
--- a/pypy/module/unicodedata/interp_ucd.py
+++ b/pypy/module/unicodedata/interp_ucd.py
@@ -251,8 +251,9 @@
result[j + 1] = V
j += 2
else:
- if j + 3 > resultlen:
- result.extend([0] * (j + 3 - resultlen + 10))
+ lgt = j + 2 - resultlen
+ if lgt > 0:
+ result.extend([0] * (lgt + 10))
resultlen = len(result)
result[j] = L
result[j + 1] = V
@@ -262,15 +263,17 @@
decomp = decomposition(ch)
if decomp:
decomplen = len(decomp)
- if j + decomplen > resultlen:
- result.extend([0] * (j + decomplen - resultlen + 10))
+ lgt = j + decomplen - resultlen
+ if lgt > 0:
+ result.extend([0] * (lgt + 10))
resultlen = len(result)
for ch in decomp:
result[j] = ch
j += 1
else:
- if j + 1 > resultlen:
- result.extend([0] * (j + 1 - resultlen + 10))
+ lgt = j + 1 - resultlen
+ if lgt > 0:
+ result.extend([0] * (lgt + 10))
resultlen = len(result)
result[j] = ch
j += 1
More information about the pypy-commit
mailing list