Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r86412:0b690c524507
Date: 2016-08-22 11:46 +0200
http://bitbucket.org/pypy/pypy/changeset/0b690c524507/

Log:    translation fix

diff --git a/pypy/module/posix/interp_scandir.py 
b/pypy/module/posix/interp_scandir.py
--- a/pypy/module/posix/interp_scandir.py
+++ b/pypy/module/posix/interp_scandir.py
@@ -71,9 +71,9 @@
 
     def next_w(self):
         if not self.dirp:
-            self.fail()
+            raise self.fail()
         if self._in_next:
-            self.fail(oefmt(self.space.w_RuntimeError,
+            raise self.fail(oefmt(self.space.w_RuntimeError,
                "cannot use ScandirIterator from multiple threads 
concurrently"))
         self._in_next = True
         try:
@@ -83,9 +83,9 @@
                 try:
                     entry = rposix_scandir.nextentry(self.dirp)
                 except OSError as e:
-                    self.fail(wrap_oserror(space, e))
+                    raise self.fail(wrap_oserror2(space, e, 
self.w_path_prefix))
                 if not entry:
-                    self.fail()
+                    raise self.fail()
                 assert rposix_scandir.has_name_bytes(entry)
                 name = rposix_scandir.get_name_bytes(entry)
                 if name != '.' and name != '..':
diff --git a/rpython/rlib/rposix_scandir.py b/rpython/rlib/rposix_scandir.py
--- a/rpython/rlib/rposix_scandir.py
+++ b/rpython/rlib/rposix_scandir.py
@@ -17,7 +17,7 @@
 def closedir(dirp):
     rposix.c_closedir(dirp)
 
-NULL_DIRP = lltype.nullptr(rposix.DIRENT)
+NULL_DIRP = lltype.nullptr(rposix.DIRP.TO)
 
 def nextentry(dirp):
     """Read the next entry and returns an opaque object.
diff --git a/rpython/rtyper/lltypesystem/rstr.py 
b/rpython/rtyper/lltypesystem/rstr.py
--- a/rpython/rtyper/lltypesystem/rstr.py
+++ b/rpython/rtyper/lltypesystem/rstr.py
@@ -648,6 +648,7 @@
 
     @staticmethod
     @jit.elidable
+    @signature(types.any(), types.any(), types.int(), types.int(), 
returns=types.int())
     def ll_rfind_char(s, ch, start, end):
         if end > len(s.chars):
             end = len(s.chars)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to