This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
remove codeset_cntr in intl
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 1 Apr 2005 13:23:45 +0200
- Subject: remove codeset_cntr in intl
After my last patch, the codeset_cntr are not used any more. (They were
used to empty the translation cache once bind_textdomain_codeset was called.
This is not necessary any more.) Here is a patch to remove them.
2005-03-27 Bruno Haible <bruno@clisp.org>
* intl/gettextP.h (struct loaded_domain): Remove codeset_cntr field.
(struct binding): Likewise.
* intl/bindtextdom.c (set_binding_values): Drop codeset_cntr
modifications.
--- glibc-20050322/intl/gettextP.h.bak2 Mon Mar 28 00:32:19 2005
+++ glibc-20050322/intl/gettextP.h Mon Mar 28 01:42:08 2005
@@ -143,8 +143,6 @@
/* 1 if the hash table uses a different endianness than this machine. */
int must_swap_hash_tab;
- int codeset_cntr;
-
/* Cache of charset conversions of the translated strings. */
struct converted_domain *conversions;
size_t nconversions;
@@ -167,7 +165,6 @@
{
struct binding *next;
char *dirname;
- int codeset_cntr; /* Incremented each time codeset changes. */
char *codeset;
char domainname[ZERO];
};
--- glibc-20050322/intl/bindtextdom.c.bak Tue Feb 22 22:16:39 2005
+++ glibc-20050322/intl/bindtextdom.c Mon Mar 28 01:43:16 2005
@@ -207,7 +207,6 @@
free (binding->codeset);
binding->codeset = result;
- ++binding->codeset_cntr;
modified = 1;
}
}
@@ -271,8 +270,6 @@
/* The default value. */
new_binding->dirname = (char *) _nl_default_dirname;
- new_binding->codeset_cntr = 0;
-
if (codesetp)
{
const char *codeset = *codesetp;
@@ -293,7 +290,6 @@
memcpy (result, codeset, len);
#endif
codeset = result;
- ++new_binding->codeset_cntr;
}
*codesetp = codeset;
new_binding->codeset = (char *) codeset;