[pypy-svn] r45500 - pypy/dist/pypy/rpython/module

arigo at codespeak.net arigo at codespeak.net
Sun Aug 5 15:01:19 CEST 2007


Author: arigo
Date: Sun Aug  5 15:01:18 2007
New Revision: 45500

Modified:
   pypy/dist/pypy/rpython/module/ll_os.py
Log:
Only use charp2str() on pointers of type exactly CCHARP.


Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py	(original)
+++ pypy/dist/pypy/rpython/module/ll_os.py	Sun Aug  5 15:01:18 2007
@@ -407,7 +407,8 @@
                     if not direntp:
                         error = rffi.c_errno
                         break
-                    name = rffi.charp2str(direntp.c_d_name)
+                    namep = rffi.cast(rffi.CCHARP, direntp.c_d_name)
+                    name = rffi.charp2str(namep)
                     if name != '.' and name != '..':
                         result.append(name)
                 os_closedir(dirp)


More information about the pypy-svn mailing list