void-packages/srcpkgs/python3/patches/posix_close_clash.patch

20 lines
1,009 B
Diff

--- Modules/posixmodule.c.orig 2014-02-11 12:02:02.194327264 +0100
+++ Modules/posixmodule.c 2014-02-11 12:03:09.665777135 +0100
@@ -7846,7 +7846,7 @@ PyDoc_STRVAR(posix_close__doc__,
Close a file descriptor (for low level IO).");
static PyObject *
-posix_close(PyObject *self, PyObject *args)
+posix_closex(PyObject *self, PyObject *args)
{
int fd, res;
if (!PyArg_ParseTuple(args, "i:close", &fd))
@@ -11252,7 +11252,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_closex, 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__},