public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] libc/iconv: Remove unneeded pointer var for _iconv_aliases
@ 2020-07-10 10:03 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2020-07-10 10:03 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2c33d31fa81d97addab774a2b460a3779990c132
commit 2c33d31fa81d97addab774a2b460a3779990c132
Author: Keith Packard via Newlib <newlib@sourceware.org>
Date: Thu Jul 9 16:58:46 2020 -0700
libc/iconv: Remove unneeded pointer var for _iconv_aliases
The pointer value for the iconv alias data never changes, so get rid
of the pointer and make it an array instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diff:
---
newlib/libc/iconv/lib/aliasesbi.c | 5 ++---
newlib/libc/iconv/lib/local.h | 4 +---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/newlib/libc/iconv/lib/aliasesbi.c b/newlib/libc/iconv/lib/aliasesbi.c
index dfd7090d0..83b6fd003 100644
--- a/newlib/libc/iconv/lib/aliasesbi.c
+++ b/newlib/libc/iconv/lib/aliasesbi.c
@@ -5,8 +5,8 @@
#include <_ansi.h>
#include "encnames.h"
-const char *
-_iconv_aliases =
+const char
+_iconv_aliases[] =
{
#if defined (_ICONV_FROM_ENCODING_BIG5) \
|| defined (_ICONV_TO_ENCODING_BIG5)
@@ -210,4 +210,3 @@ _iconv_aliases =
#endif
""
};
-
diff --git a/newlib/libc/iconv/lib/local.h b/newlib/libc/iconv/lib/local.h
index bd9dcddca..2d3a16969 100644
--- a/newlib/libc/iconv/lib/local.h
+++ b/newlib/libc/iconv/lib/local.h
@@ -57,10 +57,8 @@ typedef __uint16_t ucs2_t;
/* 32-bit UCS-4 type */
typedef __uint32_t ucs4_t;
-
/* The list of built-in encoding names and aliases */
-extern const char *
-_iconv_aliases;
+extern const char _iconv_aliases[];
#endif /* !__ICONV_LIB_LOCAL_H__ */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-10 10:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 10:03 [newlib-cygwin] libc/iconv: Remove unneeded pointer var for _iconv_aliases Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).