mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
merge 3.3 (#20594)
This commit is contained in:
commit
e18e787e70
2 changed files with 8 additions and 2 deletions
|
@ -15,6 +15,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #20594: Avoid name clash with the libc function posix_close.
|
||||||
|
|
||||||
- Issue #19856: shutil.move() failed to move a directory to other directory
|
- Issue #19856: shutil.move() failed to move a directory to other directory
|
||||||
on Windows if source name ends with os.altsep.
|
on Windows if source name ends with os.altsep.
|
||||||
|
|
||||||
|
|
|
@ -7763,8 +7763,12 @@ PyDoc_STRVAR(posix_close__doc__,
|
||||||
"close(fd)\n\n\
|
"close(fd)\n\n\
|
||||||
Close a file descriptor (for low level IO).");
|
Close a file descriptor (for low level IO).");
|
||||||
|
|
||||||
|
/*
|
||||||
|
The underscore at end of function name avoids a name clash with the libc
|
||||||
|
function posix_close.
|
||||||
|
*/
|
||||||
static PyObject *
|
static PyObject *
|
||||||
posix_close(PyObject *self, PyObject *args)
|
posix_close_(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
int fd, res;
|
int fd, res;
|
||||||
if (!PyArg_ParseTuple(args, "i:close", &fd))
|
if (!PyArg_ParseTuple(args, "i:close", &fd))
|
||||||
|
@ -11422,7 +11426,7 @@ static PyMethodDef posix_methods[] = {
|
||||||
{"open", (PyCFunction)posix_open,\
|
{"open", (PyCFunction)posix_open,\
|
||||||
METH_VARARGS | METH_KEYWORDS,
|
METH_VARARGS | METH_KEYWORDS,
|
||||||
posix_open__doc__},
|
posix_open__doc__},
|
||||||
{"close", posix_close, METH_VARARGS, posix_close__doc__},
|
{"close", posix_close_, METH_VARARGS, posix_close__doc__},
|
||||||
{"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
|
{"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
|
||||||
{"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__},
|
{"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__},
|
||||||
{"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
|
{"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue