changeset 24460:73477e755cd2

osutil._listdir: rename to _listdir_stat In upcoming patches we'll add another implementation of listdir on OS X. That implementation will have to fall back to this one under some circumstances, though. We'll make _listdir be able to detect those circumstances and use the right function as appropriate.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 25 Mar 2015 16:43:29 -0700
parents 7d369fae098e
children 05ccfe6763f1
files mercurial/osutil.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/osutil.c	Mon Mar 16 17:11:25 2015 +0900
+++ b/mercurial/osutil.c	Wed Mar 25 16:43:29 2015 -0700
@@ -286,7 +286,8 @@
 	return stat;
 }
 
-static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
+static PyObject *_listdir_stat(char *path, int pathlen, int keepstat,
+			       char *skip)
 {
 	PyObject *list, *elem, *stat = NULL, *ret = NULL;
 	char fullpath[PATH_MAX + 10];
@@ -391,6 +392,11 @@
 	return ret;
 }
 
+static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
+{
+	return _listdir_stat(path, pathlen, keepstat, skip);
+}
+
 static PyObject *statfiles(PyObject *self, PyObject *args)
 {
 	PyObject *names, *stats;