[pypy-svn] pypy ootype-virtualrefs: fix annotation

antocuni commits-noreply at bitbucket.org
Thu Apr 7 17:01:58 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: ootype-virtualrefs
Changeset: r43200:05ca454c30b9
Date: 2011-04-07 16:45 +0200
http://bitbucket.org/pypy/pypy/changeset/05ca454c30b9/

Log:	fix annotation

diff --git a/pypy/rlib/rfloat.py b/pypy/rlib/rfloat.py
--- a/pypy/rlib/rfloat.py
+++ b/pypy/rlib/rfloat.py
@@ -5,6 +5,7 @@
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 from pypy.rlib import objectmodel
 from pypy.rpython.extfunc import register_external
+from pypy.annotation.model import SomeString
 
 USE_SHORT_FLOAT_REPR = True # XXX make it a translation option?
 
@@ -45,10 +46,9 @@
 def ll_rstring_to_float(lls):
     from pypy.rpython.annlowlevel import hlstr
     s = hlstr(lls)
-    assert s is not None
     return rstring_to_float_impl(s)
 
-register_external(rstring_to_float, [str], float,
+register_external(rstring_to_float, [SomeString(can_be_None=True)], float,
                   llimpl=ll_rstring_to_float,
                   ooimpl=oo_rstring_to_float)
 


More information about the Pypy-commit mailing list