mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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:
parent
eaca5c8b95
commit
26de69dff8
1 changed files with 22 additions and 22 deletions
|
@ -1137,7 +1137,7 @@ win32_xstat_impl(const char *path, struct win32_stat *result,
|
|||
HANDLE hFile, hFile2;
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
ULONG reparse_tag = 0;
|
||||
wchar_t *target_path;
|
||||
wchar_t *target_path;
|
||||
const char *dot;
|
||||
|
||||
if(!check_GetFinalPathNameByHandle()) {
|
||||
|
@ -1233,7 +1233,7 @@ win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
|
|||
HANDLE hFile, hFile2;
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
ULONG reparse_tag = 0;
|
||||
wchar_t *target_path;
|
||||
wchar_t *target_path;
|
||||
const wchar_t *dot;
|
||||
|
||||
if(!check_GetFinalPathNameByHandle()) {
|
||||
|
@ -2204,7 +2204,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);
|
||||
|
@ -5573,7 +5573,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. */
|
||||
|
@ -5588,7 +5588,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