[pypy-svn] r65097 - pypy/trunk/pypy/rpython

jandem at codespeak.net jandem at codespeak.net
Wed May 6 16:11:45 CEST 2009


Author: jandem
Date: Wed May  6 16:11:44 2009
New Revision: 65097

Modified:
   pypy/trunk/pypy/rpython/rstr.py
Log:
fix copy/paste error in rstr find and count


Modified: pypy/trunk/pypy/rpython/rstr.py
==============================================================================
--- pypy/trunk/pypy/rpython/rstr.py	(original)
+++ pypy/trunk/pypy/rpython/rstr.py	Wed May  6 16:11:44 2009
@@ -122,7 +122,7 @@
             v_start = hop.inputconst(Signed, 0)
         if hop.nb_args > 3:
             v_end = hop.inputarg(Signed, arg=3)
-            if not hop.args_s[2].nonneg:
+            if not hop.args_s[3].nonneg:
                 raise TyperError("str.find() end must be proven non-negative")
         else:
             v_end = hop.gendirectcall(self.ll.ll_strlen, v_str)
@@ -149,7 +149,7 @@
             v_start = hop.inputconst(Signed, 0)
         if hop.nb_args > 3:
             v_end = hop.inputarg(Signed, arg=3)
-            if not hop.args_s[2].nonneg:
+            if not hop.args_s[3].nonneg:
                 raise TyperError("str.count() end must be proven non-negative")
         else:
             v_end = hop.gendirectcall(self.ll.ll_strlen, v_str)



More information about the Pypy-commit mailing list