[pypy-commit] pypy default: remove a little endian check. ctypes does not assign arrays in big endian order for int128_t (s390x)
plan_rich
pypy.commits at gmail.com
Fri Jul 1 04:17:38 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch:
Changeset: r85480:e3bd32fc0036
Date: 2016-07-01 10:16 +0200
http://bitbucket.org/pypy/pypy/changeset/e3bd32fc0036/
Log: remove a little endian check. ctypes does not assign arrays in big
endian order for int128_t (s390x)
diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py b/rpython/rtyper/lltypesystem/ll2ctypes.py
--- a/rpython/rtyper/lltypesystem/ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/ll2ctypes.py
@@ -171,10 +171,7 @@
_length_ = 2
@property
def value(self):
- if sys.byteorder == 'little':
- res = self[0] | (self[1] << 64)
- else:
- res = self[1] | (self[0] << 64)
+ res = self[0] | (self[1] << 64)
if res >= (1 << 127):
res -= 1 << 128
return res
More information about the pypy-commit
mailing list