[pypy-commit] pypy remove-intlong-smm: restore the barely more efficient overrides

pjenvey noreply at buildbot.pypy.org
Fri Feb 21 02:24:30 CET 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: remove-intlong-smm
Changeset: r69229:d788869dbd75
Date: 2014-02-20 17:12 -0800
http://bitbucket.org/pypy/pypy/changeset/d788869dbd75/

Log:	restore the barely more efficient overrides

diff --git a/pypy/objspace/std/boolobject.py b/pypy/objspace/std/boolobject.py
--- a/pypy/objspace/std/boolobject.py
+++ b/pypy/objspace/std/boolobject.py
@@ -2,6 +2,7 @@
 
 import operator
 
+from rpython.rlib.rarithmetic import r_uint
 from rpython.tool.sourcetools import func_renamer, func_with_new_name
 
 from pypy.interpreter.gateway import WrappedDefault, interp2app, unwrap_spec
@@ -24,6 +25,12 @@
     def unwrap(self, space):
         return bool(self.intval)
 
+    def uint_w(self, space):
+        return r_uint(self.intval)
+
+    def int(self, space):
+        return space.newint(self.intval)
+
     @staticmethod
     @unwrap_spec(w_obj=WrappedDefault(False))
     def descr_new(space, w_booltype, w_obj):


More information about the pypy-commit mailing list