mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
(Merge 3.2) posixmodule.c: fix function name in argument parsing
Fix os.fchown() and os.open() Remove also trailing spaces and replace tabs by spaces.
This commit is contained in:
commit
6ee7a57b38
1 changed files with 9 additions and 9 deletions
|
|
@ -2275,7 +2275,7 @@ posix_fchown(PyObject *self, PyObject *args)
|
|||
int fd;
|
||||
long uid, gid;
|
||||
int res;
|
||||
if (!PyArg_ParseTuple(args, "ill:chown", &fd, &uid, &gid))
|
||||
if (!PyArg_ParseTuple(args, "ill:fchown", &fd, &uid, &gid))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
res = fchown(fd, (uid_t) uid, (gid_t) gid);
|
||||
|
|
@ -6076,7 +6076,7 @@ posix_open(PyObject *self, PyObject *args)
|
|||
|
||||
#ifdef MS_WINDOWS
|
||||
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
|
||||
/* PyUnicode_AS_UNICODE OK without thread
|
||||
lock as it is a simple dereference. */
|
||||
|
|
@ -6091,7 +6091,7 @@ posix_open(PyObject *self, PyObject *args)
|
|||
PyErr_Clear();
|
||||
#endif
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O&i|i",
|
||||
if (!PyArg_ParseTuple(args, "O&i|i:open",
|
||||
PyUnicode_FSConverter, &ofile,
|
||||
&flag, &mode))
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue