[Python-checkins] cpython: Issue #14746: Remove redundant paragraphs from skipitem() in Python/getargs.c.

larry.hastings python-checkins at python.org
Wed May 9 08:52:25 CEST 2012


http://hg.python.org/cpython/rev/8ab37fa24e58
changeset:   76845:8ab37fa24e58
parent:      76843:8bfe89e9d851
user:        Larry Hastings <larry at hastings.org>
date:        Tue May 08 23:52:03 2012 -0700
summary:
  Issue #14746: Remove redundant paragraphs from skipitem() in Python/getargs.c.

files:
  Python/getargs.c |  26 ++++++++------------------
  1 files changed, 8 insertions(+), 18 deletions(-)


diff --git a/Python/getargs.c b/Python/getargs.c
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1609,8 +1609,10 @@
 
     switch (c) {
 
-    /* simple codes
-     * The individual types (second arg of va_arg) are irrelevant */
+    /*
+     * codes that take a single data pointer as an argument
+     * (the type of the pointer is irrelevant)
+     */
 
     case 'b': /* byte -- very short int */
     case 'B': /* byte as bitfield */
@@ -1624,23 +1626,21 @@
     case 'L': /* PY_LONG_LONG */
     case 'K': /* PY_LONG_LONG sized bitfield */
 #endif
+    case 'n': /* Py_ssize_t */
     case 'f': /* float */
     case 'd': /* double */
     case 'D': /* complex double */
     case 'c': /* char */
     case 'C': /* unicode char */
     case 'p': /* boolean predicate */
+    case 'S': /* string object */
+    case 'Y': /* string object */
+    case 'U': /* unicode string object */
         {
             (void) va_arg(*p_va, void *);
             break;
         }
 
-    case 'n': /* Py_ssize_t */
-        {
-            (void) va_arg(*p_va, Py_ssize_t *);
-            break;
-        }
-
     /* string codes */
 
     case 'e': /* string with encoding */
@@ -1673,16 +1673,6 @@
             break;
         }
 
-    /* object codes */
-
-    case 'S': /* string object */
-    case 'Y': /* string object */
-    case 'U': /* unicode string object */
-        {
-            (void) va_arg(*p_va, PyObject **);
-            break;
-        }
-
     case 'O': /* object */
         {
             if (*format == '!') {

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


More information about the Python-checkins mailing list