]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
From glibc: 2007-07-26 Jakub Jelinek <jakub@redhat.com>
authorBruno Haible <bruno@clisp.org>
Sat, 13 Oct 2007 15:53:46 +0000 (15:53 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:16 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/eval-plural.h
gettext-runtime/intl/gettextP.h
gettext-runtime/intl/loadmsgcat.c
gettext-runtime/intl/plural-exp.c
gettext-runtime/intl/plural-exp.h

index 857bea4d5be21fb6a438a2549b7943c35ee388bd..ec238efec8c9b43009aa72e8965da7892a63c4d4 100644 (file)
@@ -1,3 +1,16 @@
+2007-07-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * gettextP.h (struct loaded_domain): Change plural to const
+       struct expression *.
+       * eval-plural.h (plural_eval): Change first argument to
+       const struct expression *.
+       * plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first argument to
+       const struct expression **.
+       * plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust
+       prototypes.
+       * loadmsgcat.c (_nl_unload_domain): Cast away const in call to
+       __gettext_free_exp.
+
 2007-07-19  Jakub Jelinek  <jakub@redhat.com>
 
        * dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
index dacd003db07ef2fe78c9d4e55cbd7eebe23e7b63..21eecb3a0cac75634ea8728aa1543ea84936ad06 100644 (file)
@@ -1,5 +1,5 @@
 /* Plural expression evaluation.
-   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
@@ -24,7 +24,7 @@
 STATIC
 unsigned long int
 internal_function
-plural_eval (struct expression *pexp, unsigned long int n)
+plural_eval (const struct expression *pexp, unsigned long int n)
 {
   switch (pexp->nargs)
     {
index 449eb770182db9b84119807e7f789d6d982073c8..8a464de4e7b2c04b2b044540dadc090f9c09cfae 100644 (file)
@@ -186,7 +186,7 @@ struct loaded_domain
   struct converted_domain *conversions;
   size_t nconversions;
 
-  struct expression *plural;
+  const struct expression *plural;
   unsigned long int nplurals;
 };
 
index 8e01c53a5e476fc97003724c9839ce9a99234fa0..ec766bc713978379b3061dc0645c7b9ed022a735 100644 (file)
@@ -1,5 +1,5 @@
 /* Load needed message catalogs.
-   Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
@@ -1304,7 +1304,7 @@ _nl_unload_domain (struct loaded_domain *domain)
   size_t i;
 
   if (domain->plural != &__gettext_germanic_plural)
-    __gettext_free_exp (domain->plural);
+    __gettext_free_exp ((struct expression *) domain->plural);
 
   for (i = 0; i < domain->nconversions; i++)
     {
index 46fa758112701b441af48253e3f5bf53a9fbdc08..751a688eb395c57482d7d61a63551c8d0f8bf87a 100644 (file)
@@ -1,5 +1,5 @@
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
 
    This program is free software; you can redistribute it and/or modify it
@@ -96,7 +96,8 @@ init_germanic_plural ()
 
 void
 internal_function
-EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
+EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
+                          const struct expression **pluralp,
                           unsigned long int *npluralsp)
 {
   if (nullentry != NULL)
index b0992b986a6a9eae04184d48596f4ea3d8edc298..d6cb8c51b65debd4a6283b5da38f9d2b418afdab 100644 (file)
@@ -1,5 +1,5 @@
 /* Expression parsing and evaluation for plural form selection.
-   Copyright (C) 2000-2003, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
 
    This program is free software; you can redistribute it and/or modify it
@@ -112,12 +112,12 @@ extern void FREE_EXPRESSION (struct expression *exp)
 extern int PLURAL_PARSE (void *arg);
 extern struct expression GERMANIC_PLURAL attribute_hidden;
 extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
-                                      struct expression **pluralp,
+                                      const struct expression **pluralp,
                                       unsigned long int *npluralsp)
      internal_function;
 
 #if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE)
-extern unsigned long int plural_eval (struct expression *pexp,
+extern unsigned long int plural_eval (const struct expression *pexp,
                                      unsigned long int n);
 #endif