diff options
author | Guido van Rossum <guido@python.org> | 1992-08-27 07:45:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-08-27 07:45:12 (GMT) |
commit | a93265a66689729a293aac07d3984203142ff90f (patch) | |
tree | 0b4ffd5434e550ee37afd88ba0a57d104dcce29d | |
parent | a43111118ff4e5ccc88e3307b998cb9e983207ed (diff) | |
download | cpython-a93265a66689729a293aac07d3984203142ff90f.zip cpython-a93265a66689729a293aac07d3984203142ff90f.tar.gz cpython-a93265a66689729a293aac07d3984203142ff90f.tar.bz2 |
suppress unnecessary error message if too many arguments are passed
-rw-r--r-- | Python/modsupport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index 352a5fb..1934cad 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -114,7 +114,7 @@ do_arg(arg, p_format, p_va) switch (*format++) { - case '('/*')'*/: /* tuple, distributed over C parameters */ { + case '(': /* tuple, distributed over C parameters */ { int i, n; if (!is_tupleobject(arg)) return 0; @@ -123,11 +123,14 @@ do_arg(arg, p_format, p_va) if (!do_arg(gettupleitem(arg, i), &format, &va)) return 0; } - if (*format++ != /*'('*/')') + if (*format++ != ')') return 0; break; } + case ')': /* End of format -- too many arguments */ + return 0; + case 'b': /* byte -- very short int */ { char *p = va_arg(va, char *); if (is_intobject(arg)) |