]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
suppress unnecessary error message if too many arguments are passed
authorGuido van Rossum <guido@python.org>
Thu, 27 Aug 1992 07:45:12 +0000 (07:45 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Aug 1992 07:45:12 +0000 (07:45 +0000)
Python/modsupport.c

index 352a5fb7bbf43d9db61c0545f809459444078362..1934cad52d2be54fc6ed58f80df0ed382daad912 100644 (file)
@@ -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))