Commits

Amaury Forgeot d'Arc committed d6e3c12

Translation fix

Comments (0)

Files changed (1)

pypy/module/cpyext/longobject.py

 from pypy.interpreter.error import OperationError
 from pypy.module.cpyext.intobject import PyInt_AsUnsignedLongMask
 from pypy.rlib.rbigint import rbigint
+from pypy.rlib.rarithmetic import intmask
 
 
 PyLong_Check, PyLong_CheckExact = build_type_checkers("Long")
 
     for i in range(0, n):
         if little_endian:
-            c = int(bytes[i])
+            c = intmask(bytes[i])
         else:
-            c = int(bytes[n - i - 1])
+            c = intmask(bytes[n - i - 1])
         if i == 0 and signed and c & 0x80:
             negative = True
         if negative: