Commit 26de69df authored by Victor Stinner's avatar Victor Stinner

posixmodule.c: fix function name in argument parsing

Fix os.fchown() and os.open()

Remove also trailing spaces and replace tabs by spaces.
parent eaca5c8b
...@@ -2204,7 +2204,7 @@ posix_fchown(PyObject *self, PyObject *args) ...@@ -2204,7 +2204,7 @@ posix_fchown(PyObject *self, PyObject *args)
int fd; int fd;
long uid, gid; long uid, gid;
int res; int res;
if (!PyArg_ParseTuple(args, "ill:chown", &fd, &uid, &gid)) if (!PyArg_ParseTuple(args, "ill:fchown", &fd, &uid, &gid))
return NULL; return NULL;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
res = fchown(fd, (uid_t) uid, (gid_t) gid); res = fchown(fd, (uid_t) uid, (gid_t) gid);
...@@ -5573,7 +5573,7 @@ posix_open(PyObject *self, PyObject *args) ...@@ -5573,7 +5573,7 @@ posix_open(PyObject *self, PyObject *args)
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
PyUnicodeObject *po; PyUnicodeObject *po;
if (PyArg_ParseTuple(args, "Ui|i:mkdir", &po, &flag, &mode)) { if (PyArg_ParseTuple(args, "Ui|i:open", &po, &flag, &mode)) {
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
/* PyUnicode_AS_UNICODE OK without thread /* PyUnicode_AS_UNICODE OK without thread
lock as it is a simple dereference. */ lock as it is a simple dereference. */
...@@ -5588,7 +5588,7 @@ posix_open(PyObject *self, PyObject *args) ...@@ -5588,7 +5588,7 @@ posix_open(PyObject *self, PyObject *args)
PyErr_Clear(); PyErr_Clear();
#endif #endif
if (!PyArg_ParseTuple(args, "O&i|i", if (!PyArg_ParseTuple(args, "O&i|i:open",
PyUnicode_FSConverter, &ofile, PyUnicode_FSConverter, &ofile,
&flag, &mode)) &flag, &mode))
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment