Dmitry Timoshkov : widl: Constify some data.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 30 06:20:16 CDT 2007


Module: wine
Branch: master
Commit: c6747d57ed1b4ed984c6acd6f4ab1e67487cba87
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c6747d57ed1b4ed984c6acd6f4ab1e67487cba87

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Thu Aug 30 17:17:50 2007 +0900

widl: Constify some data.

---

 tools/widl/typelib.c |    5 +++--
 tools/widl/widl.c    |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index 23238cf..7afeef6 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -103,7 +103,7 @@ int is_array(const type_t *t)
 /* List of oleauto types that should be recognized by name.
  * (most of) these seem to be intrinsic types in mktyplib. */
 
-static struct oatype {
+static const struct oatype {
   const char *kw;
   unsigned short vt;
 } oatypes[] = {
@@ -129,7 +129,8 @@ static int kw_cmp_func(const void *s1, const void *s2)
 static unsigned short builtin_vt(const type_t *t)
 {
   const char *kw = t->name;
-  struct oatype key, *kwp;
+  struct oatype key;
+  const struct oatype *kwp;
   key.kw = kw;
 #ifdef KW_BSEARCH
   kwp = bsearch(&key, oatypes, NTYPES, sizeof(oatypes[0]), kw_cmp_func);
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 21657b6..cca1325 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -49,7 +49,7 @@
 /* O = generate interpreted stubs */
 /* w = select win16/win32 output (?) */
 
-static char usage[] =
+static const char usage[] =
 "Usage: widl [options...] infile.idl\n"
 "   -c          Generate client stub\n"
 "   -C file     Name of client stub file (default is infile_c.c)\n"
@@ -133,9 +133,9 @@ enum {
     PREFIX_SERVER_OPTION
 };
 
-static const char *short_options =
+static const char short_options[] =
     "cC:d:D:EhH:I:NpP:sS:tT:uU:VW";
-static struct option long_options[] = {
+static const struct option long_options[] = {
     { "oldnames", no_argument, 0, OLDNAMES_OPTION },
     { "prefix-all", required_argument, 0, PREFIX_ALL_OPTION },
     { "prefix-client", required_argument, 0, PREFIX_CLIENT_OPTION },




More information about the wine-cvs mailing list