Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: space-newtext Changeset: r88072:3e71c512f034 Date: 2016-11-02 13:07 +0100 http://bitbucket.org/pypy/pypy/changeset/3e71c512f034/
Log: operator diff --git a/pypy/module/operator/interp_operator.py b/pypy/module/operator/interp_operator.py --- a/pypy/module/operator/interp_operator.py +++ b/pypy/module/operator/interp_operator.py @@ -245,13 +245,13 @@ @unwrap_spec(default=int) def _length_hint(space, w_iterable, default): - return space.wrap(space.length_hint(w_iterable, default)) + return space.newint(space.length_hint(w_iterable, default)) def isMappingType(space, w_obj): 'isMappingType(a) -- Return True if a has a mapping type, False otherwise.' - return space.wrap(space.ismapping_w(w_obj)) + return space.newbool(space.ismapping_w(w_obj)) def isSequenceType(space, w_obj): 'isSequenceType(a) -- Return True if a has a sequence type, False otherwise.' - return space.wrap(space.issequence_w(w_obj)) + return space.newbool(space.issequence_w(w_obj)) diff --git a/pypy/module/operator/tscmp.py b/pypy/module/operator/tscmp.py --- a/pypy/module/operator/tscmp.py +++ b/pypy/module/operator/tscmp.py @@ -53,7 +53,7 @@ with rffi.scoped_nonmoving_unicodebuffer(a) as a_buf: with rffi.scoped_nonmoving_unicodebuffer(b) as b_buf: result = pypy_tscmp_wide(a_buf, b_buf, len(a), len(b)) - return space.wrap(rffi.cast(lltype.Bool, result)) + return space.newbool(rffi.cast(lltype.Bool, result)) return compare_digest_buffer(space, w_a, w_b) @@ -71,4 +71,4 @@ with rffi.scoped_nonmovingbuffer(a) as a_buf: with rffi.scoped_nonmovingbuffer(b) as b_buf: result = pypy_tscmp(a_buf, b_buf, len(a), len(b)) - return space.wrap(rffi.cast(lltype.Bool, result)) + return space.newbool(rffi.cast(lltype.Bool, result)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit