summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-06-09 14:10:38 (GMT)
committerBrian Curtin <brian@python.org>2011-06-09 14:10:38 (GMT)
commit95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8 (patch)
tree0a5b47b33efa3507b2386bc156bbff4bab911dee /Modules
parentebc991c0ce4493be276f2ea29676131b8880ec10 (diff)
downloadcpython-95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8.zip
cpython-95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8.tar.gz
cpython-95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8.tar.bz2
Correction to 88e318166eaf - Issue #11583
Rather than wrapping the C _isdir function in a Python function, just import the C _isdir function directly. Additionally, add in the docstring which was left out.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 767ed61..eb2e412 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -2820,6 +2820,9 @@ posix__getfileinformation(PyObject *self, PyObject *args)
info.nFileIndexLow);
}
+PyDoc_STRVAR(posix__isdir__doc__,
+"Return true if the pathname refers to an existing directory.");
+
static PyObject *
posix__isdir(PyObject *self, PyObject *args)
{
@@ -8091,7 +8094,7 @@ static PyMethodDef posix_methods[] = {
{"_getfullpathname", posix__getfullpathname, METH_VARARGS, NULL},
{"_getfinalpathname", posix__getfinalpathname, METH_VARARGS, NULL},
{"_getfileinformation", posix__getfileinformation, METH_VARARGS, NULL},
- {"_isdir", posix__isdir, METH_VARARGS, NULL},
+ {"_isdir", posix__isdir, METH_VARARGS, posix__isdir__doc__},
#endif
#ifdef HAVE_GETLOADAVG
{"getloadavg", posix_getloadavg, METH_NOARGS, posix_getloadavg__doc__},