Author: Antonio Cuni <anto.c...@gmail.com> Branch: ffistruct Changeset: r51276:903365dd2b8f Date: 2012-01-12 14:29 +0100 http://bitbucket.org/pypy/pypy/changeset/903365dd2b8f/
Log: use truncatedlonglong_w instead of manually converting to bigint and then call ulonglongmask diff --git a/pypy/module/_ffi/type_converter.py b/pypy/module/_ffi/type_converter.py --- a/pypy/module/_ffi/type_converter.py +++ b/pypy/module/_ffi/type_converter.py @@ -58,10 +58,8 @@ def _longlong(self, w_ffitype, w_obj): # a separate function, which can be seen by the jit or not, # depending on whether longlongs are supported - bigval = self.space.bigint_w(w_obj) # XXX, use truncatedlonglong? - ullval = bigval.ulonglongmask() - llval = rffi.cast(rffi.LONGLONG, ullval) - self.handle_longlong(w_ffitype, w_obj, llval) + longlongval = self.space.truncatedlonglong_w(w_obj) + self.handle_longlong(w_ffitype, w_obj, longlongval) def _float(self, w_ffitype, w_obj): # a separate function, which can be seen by the jit or not, _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit