diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-02-11 15:19:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-02-11 15:19:12 (GMT) |
commit | 5d95afa99d6bc6da9aecee8ceb7f8ee43521eb85 (patch) | |
tree | 19e041b8a1e224a37ca98a9c5f0791dd04a2ad68 | |
parent | 208556c51ff5598070ff64f0a741628152846933 (diff) | |
download | cpython-5d95afa99d6bc6da9aecee8ceb7f8ee43521eb85.zip cpython-5d95afa99d6bc6da9aecee8ceb7f8ee43521eb85.tar.gz cpython-5d95afa99d6bc6da9aecee8ceb7f8ee43521eb85.tar.bz2 |
merge 3.3 (#20594)
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/posixmodule.c | 8 |
2 files changed, 8 insertions, 2 deletions
@@ -13,6 +13,8 @@ Core and Builtins Library ------- +- Issue #20594: Avoid name clash with the libc function posix_close. + What's New in Python 3.4.0 release candidate 1? =============================================== diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 71abc98..6cbc78f 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7763,8 +7763,12 @@ PyDoc_STRVAR(posix_close__doc__, "close(fd)\n\n\ 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 * -posix_close(PyObject *self, PyObject *args) +posix_close_(PyObject *self, PyObject *args) { int fd, res; if (!PyArg_ParseTuple(args, "i:close", &fd)) @@ -11422,7 +11426,7 @@ static PyMethodDef posix_methods[] = { {"open", (PyCFunction)posix_open,\ METH_VARARGS | METH_KEYWORDS, 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__}, {"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__}, {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, |