+2008-08-14 Bruno Haible <bruno@clisp.org>
+
+ * format-python.c (format_check): Require the same number of unnamed
+ arguments also when !equality.
+ Reported by Alexander Dupuy <alex.dupuy@mac.com> in
+ <http://savannah.gnu.org/bugs/?24025>.
+
2008-08-14 Bruno Haible <bruno@clisp.org>
* msgmerge.c: Include "glthread/lock.h" instead of "lock.h".
/* Python format strings.
- Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
- 'e', 'E', 'f', 'g', 'G', that need a floating-point argument.
Use of '(ident)' and use of unnamed argument specifications are exclusive,
because the first requires a mapping as argument, while the second requires
- a tuple as argument.
+ a tuple as argument. When unnamed arguments are used, the number of
+ arguments in the format string and the number of elements in the argument
+ tuple (to the right of the '%' operator) must be the same.
*/
enum format_arg_type
unsigned int i;
/* Check the argument types are the same. */
- if (equality
- ? spec1->unnamed_arg_count != spec2->unnamed_arg_count
- : spec1->unnamed_arg_count < spec2->unnamed_arg_count)
+ if (spec1->unnamed_arg_count != spec2->unnamed_arg_count)
{
if (error_logger)
error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),