[pypy-commit] pypy default: merge heads
arigo
pypy.commits at gmail.com
Tue Jan 5 09:01:37 EST 2016
Author: Armin Rigo <arigo at tunes.org>
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()
More information about the pypy-commit
mailing list