diff options
author | Charles-François Natali <neologix@free.fr> | 2012-02-06 18:54:48 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2012-02-06 18:54:48 (GMT) |
commit | 77940902512c85e2d09dd5bd913084dc547881ff (patch) | |
tree | 8bf5109d39f6439057c837ad66e3e6347217dd4e /Modules/posixmodule.c | |
parent | 9878b63c7c70b33ea21cd06a2c30ca1344962f02 (diff) | |
download | cpython-77940902512c85e2d09dd5bd913084dc547881ff.zip cpython-77940902512c85e2d09dd5bd913084dc547881ff.tar.gz cpython-77940902512c85e2d09dd5bd913084dc547881ff.tar.bz2 |
Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), to
be consistent with other functions accepting file descriptors (fdlistdir() was
added in 3.3, so hasn't been released yet).
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2269fe9..2251a62 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2867,12 +2867,12 @@ posix_listdir(PyObject *self, PyObject *args) } /* end of posix_listdir */ #ifdef HAVE_FDOPENDIR -PyDoc_STRVAR(posix_fdlistdir__doc__, -"fdlistdir(fd) -> list_of_strings\n\n\ +PyDoc_STRVAR(posix_flistdir__doc__, +"flistdir(fd) -> list_of_strings\n\n\ Like listdir(), but uses a file descriptor instead."); static PyObject * -posix_fdlistdir(PyObject *self, PyObject *args) +posix_flistdir(PyObject *self, PyObject *args) { PyObject *d, *v; DIR *dirp; @@ -2880,7 +2880,7 @@ posix_fdlistdir(PyObject *self, PyObject *args) int fd; errno = 0; - if (!PyArg_ParseTuple(args, "i:fdlistdir", &fd)) + if (!PyArg_ParseTuple(args, "i:flistdir", &fd)) return NULL; /* closedir() closes the FD, so we duplicate it */ fd = dup(fd); @@ -10555,7 +10555,7 @@ static PyMethodDef posix_methods[] = { #endif /* HAVE_LINK */ {"listdir", posix_listdir, METH_VARARGS, posix_listdir__doc__}, #ifdef HAVE_FDOPENDIR - {"fdlistdir", posix_fdlistdir, METH_VARARGS, posix_fdlistdir__doc__}, + {"flistdir", posix_flistdir, METH_VARARGS, posix_flistdir__doc__}, #endif {"lstat", posix_lstat, METH_VARARGS, posix_lstat__doc__}, {"mkdir", posix_mkdir, METH_VARARGS, posix_mkdir__doc__}, |