mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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.
This commit is contained in:
parent
ebc991c0ce
commit
95d028fd18
2 changed files with 7 additions and 6 deletions
|
@ -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__},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue