[pypy-commit] pypy default: (cfbolz, bivab) mark readdir as macro in the implementation of listdir

bivab noreply at buildbot.pypy.org
Wed Apr 18 15:03:24 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: 
Changeset: r54494:9cda37139e0d
Date: 2012-04-18 15:01 +0200
http://bitbucket.org/pypy/pypy/changeset/9cda37139e0d/

Log:	(cfbolz, bivab) mark readdir as macro in the implementation of
	listdir

diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py
--- a/pypy/rpython/module/ll_os.py
+++ b/pypy/rpython/module/ll_os.py
@@ -1168,8 +1168,11 @@
             DIRENTP = lltype.Ptr(DIRENT)
             os_opendir = self.llexternal('opendir', [rffi.CCHARP], DIRP,
                                          compilation_info=compilation_info)
+            # XXX macro=True is hack to make sure we get the correct kind of
+            # dirent struct (which depends on defines)
             os_readdir = self.llexternal('readdir', [DIRP], DIRENTP,
-                                         compilation_info=compilation_info)
+                                         compilation_info=compilation_info,
+                                         macro=True)
             os_closedir = self.llexternal('closedir', [DIRP], rffi.INT,
                                           compilation_info=compilation_info)
 


More information about the pypy-commit mailing list