summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2012-05-09 06:52:03 (GMT)
committerLarry Hastings <larry@hastings.org>2012-05-09 06:52:03 (GMT)
commita34790104c3d5961a583f60d6b289322b981efd4 (patch)
tree3e747b9661de2e7c4fded5947e3f995d02c740e1 /Python
parent7ca8d1f748bbac45d75035b8fb11984c1a835b0c (diff)
downloadcpython-a34790104c3d5961a583f60d6b289322b981efd4.zip
cpython-a34790104c3d5961a583f60d6b289322b981efd4.tar.gz
cpython-a34790104c3d5961a583f60d6b289322b981efd4.tar.bz2
Issue #14746: Remove redundant paragraphs from skipitem() in Python/getargs.c.
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 5ddf236..17c4ee5 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1609,8 +1609,10 @@ skipitem(const char **p_format, va_list *p_va, int flags)
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 @@ skipitem(const char **p_format, va_list *p_va, int flags)
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 @@ skipitem(const char **p_format, va_list *p_va, int flags)
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 == '!') {