[pypy-commit] pypy refactor-str-types: (antocuni, mjacob, arigo): we need to specialize _isspace too, else 'char' is promoted to unicode and we always hit the unicode path

antocuni noreply at buildbot.pypy.org
Wed Jan 15 20:56:38 CET 2014


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: refactor-str-types
Changeset: r68688:4316d9dd77e0
Date: 2014-01-15 18:46 +0100
http://bitbucket.org/pypy/pypy/changeset/4316d9dd77e0/

Log:	(antocuni, mjacob, arigo): we need to specialize _isspace too, else
	'char' is promoted to unicode and we always hit the unicode path

diff --git a/rpython/rlib/rstring.py b/rpython/rlib/rstring.py
--- a/rpython/rlib/rstring.py
+++ b/rpython/rlib/rstring.py
@@ -14,6 +14,7 @@
 
 # -------------- public API for string functions -----------------------
 
+ at specialize.argtype(0)
 def _isspace(char):
     if isinstance(char, str):
         return char.isspace()


More information about the pypy-commit mailing list