[pypy-commit] pypy py3k: Fix tests for _cffi_backend
amauryfa
noreply at buildbot.pypy.org
Thu Oct 11 23:04:31 CEST 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r58016:8f44495db914
Date: 2012-10-11 18:43 +0200
http://bitbucket.org/pypy/pypy/changeset/8f44495db914/
Log: Fix tests for _cffi_backend
diff --git a/pypy/module/_cffi_backend/misc.py b/pypy/module/_cffi_backend/misc.py
--- a/pypy/module/_cffi_backend/misc.py
+++ b/pypy/module/_cffi_backend/misc.py
@@ -209,11 +209,6 @@
def as_unsigned_long(space, w_ob, strict):
# same as as_unsigned_long_long(), but returning just an Unsigned
- if space.is_w(space.type(w_ob), space.w_int): # shortcut
- value = space.int_w(w_ob)
- if strict and value < 0:
- raise OperationError(space.w_OverflowError, space.wrap(neg_msg))
- return r_uint(value)
try:
bigint = space.bigint_w(w_ob)
except OperationError, e:
@@ -242,8 +237,6 @@
def _standard_object_as_bool(space, w_ob):
if space.isinstance_w(w_ob, space.w_int):
- return space.int_w(w_ob) != 0
- if space.isinstance_w(w_ob, space.w_long):
return space.bigint_w(w_ob).tobool()
if space.isinstance_w(w_ob, space.w_float):
return space.float_w(w_ob) != 0.0
More information about the pypy-commit
mailing list