[pypy-commit] pypy py3.5: Attempt to import interp_scandir on Windows

amauryfa pypy.commits at gmail.com
Sat Apr 1 12:42:43 EDT 2017


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.5
Changeset: r90899:ba2d0d7ea48e
Date: 2017-04-01 18:42 +0200
http://bitbucket.org/pypy/pypy/changeset/ba2d0d7ea48e/

Log:	Attempt to import interp_scandir on Windows

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
@@ -1,4 +1,4 @@
-from rpython.rlib import rposix
+from rpython.rlib import rposix, rwin32
 from rpython.rlib.objectmodel import specialize
 from rpython.rtyper.lltypesystem import lltype, rffi
 
@@ -17,7 +17,8 @@
 def closedir(dirp):
     rposix.c_closedir(dirp)
 
-NULL_DIRP = lltype.nullptr(rposix.DIRP.TO)
+if not rwin32.WIN32:
+    NULL_DIRP = lltype.nullptr(rposix.DIRP.TO)
 
 def nextentry(dirp):
     """Read the next entry and returns an opaque object.


More information about the pypy-commit mailing list