Author: Armin Rigo <[email protected]>
Branch:
Changeset: r81584:d0004489a9cc
Date: 2016-01-05 15:00 +0100
http://bitbucket.org/pypy/pypy/changeset/d0004489a9cc/
Log: merge heads
diff --git a/lib_pypy/cPickle.py b/lib_pypy/cPickle.py
--- a/lib_pypy/cPickle.py
+++ b/lib_pypy/cPickle.py
@@ -559,6 +559,7 @@
def decode_long(data):
r"""Decode a long from a two's complement little-endian binary string.
+ This is overriden on PyPy by a RPython version that has linear complexity.
>>> decode_long('')
0L
@@ -592,6 +593,11 @@
n -= 1L << (nbytes << 3)
return n
+try:
+ from __pypy__ import decode_long
+except ImportError:
+ pass
+
def load(f):
return Unpickler(f).load()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit