[pypy-commit] pypy virtual-arguments: another assert

fijal noreply at buildbot.pypy.org
Wed Jul 18 15:06:50 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56145:7c94b4420a32
Date: 2012-07-18 15:06 +0200
http://bitbucket.org/pypy/pypy/changeset/7c94b4420a32/

Log:	another assert

diff --git a/pypy/rlib/rbigint.py b/pypy/rlib/rbigint.py
--- a/pypy/rlib/rbigint.py
+++ b/pypy/rlib/rbigint.py
@@ -187,6 +187,7 @@
         if expo <= 0:
             return rbigint()
         ndig = (expo-1) // SHIFT + 1 # Number of 'digits' in result
+        assert ndig >= 0
         v = rbigint([NULLDIGIT] * ndig, sign)
         frac = math.ldexp(frac, (expo-1) % SHIFT + 1)
         for i in range(ndig-1, -1, -1):


More information about the pypy-commit mailing list