[Python-checkins] cpython (merge 3.2 -> default): (Merge 3.2) posixmodule.c: fix function name in argument parsing

victor.stinner python-checkins at python.org
Fri Jun 17 15:18:14 CEST 2011


http://hg.python.org/cpython/rev/496c49ef3029
changeset:   70841:496c49ef3029
parent:      70839:6d38060f290c
parent:      70840:f6d6afe53385
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Fri Jun 17 15:18:16 2011 +0200
summary:
  (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.

files:
  Modules/posixmodule.c |  18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)


diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1162,11 +1162,11 @@
 win32_xstat_impl(const char *path, struct win32_stat *result,
                  BOOL traverse)
 {
-    int code; 
+    int code;
     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()) {
@@ -1262,7 +1262,7 @@
     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()) {
@@ -1281,7 +1281,7 @@
         /* FILE_FLAG_OPEN_REPARSE_POINT does not follow the symlink.
            Because of this, calls like GetFinalPathNameByHandle will return
            the symlink path agin and not the actual final path. */
-        FILE_ATTRIBUTE_NORMAL|FILE_FLAG_BACKUP_SEMANTICS| 
+        FILE_ATTRIBUTE_NORMAL|FILE_FLAG_BACKUP_SEMANTICS|
             FILE_FLAG_OPEN_REPARSE_POINT,
         NULL);
 
@@ -2275,7 +2275,7 @@
     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 @@
 
 #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 @@
     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;
@@ -8982,12 +8982,12 @@
     }
     else {
         if (extract_time(PyTuple_GET_ITEM(arg, 0),
-				&(buf[0].tv_sec), &(buf[0].tv_usec)) == -1) {
+                         &(buf[0].tv_sec), &(buf[0].tv_usec)) == -1) {
             Py_DECREF(opath);
             return NULL;
         }
         if (extract_time(PyTuple_GET_ITEM(arg, 1),
-				&(buf[1].tv_sec), &(buf[1].tv_usec)) == -1) {
+                         &(buf[1].tv_sec), &(buf[1].tv_usec)) == -1) {
             Py_DECREF(opath);
             return NULL;
         }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list