Mercurial > cpython-lru_cache-weakref
diff Python/modsupport.c @ 998:09b48604855f legacy-trunk
suppress unnecessary error message if too many arguments are passed
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 27 Aug 1992 07:45:12 +0000 |
| parents | 5c6cdb58a801 |
| children | 533e36de1e4d |
line wrap: on
line diff
--- a/Python/modsupport.c Tue Aug 25 13:53:10 1992 +0000 +++ b/Python/modsupport.c Thu Aug 27 07:45:12 1992 +0000 @@ -114,7 +114,7 @@ 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 @@ 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))
