widl: Make 'attrs' field of type_t const.
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 925301d..7f26233 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -490,7 +490,7 @@
   fprintf(header, ";\n\n");
 }
 
-void write_library(const char *name, attr_t *attr) {
+void write_library(const char *name, const attr_t *attr) {
   const UUID *uuid = get_attrp(attr, ATTR_UUID);
   fprintf(header, "\n");
   write_guid("LIBID", name, uuid);
@@ -521,7 +521,7 @@
 
 /********** INTERFACES **********/
 
-int is_object(attr_t *a)
+int is_object(const attr_t *a)
 {
   while (a) {
     if (a->type == ATTR_OBJECT || a->type == ATTR_ODL) return 1;
@@ -530,12 +530,12 @@
   return 0;
 }
 
-int is_local(attr_t *a)
+int is_local(const attr_t *a)
 {
   return is_attr(a, ATTR_LOCAL);
 }
 
-const var_t *is_callas(attr_t *a)
+const var_t *is_callas(const attr_t *a)
 {
   return get_attrp(a, ATTR_CALLAS);
 }
diff --git a/tools/widl/header.h b/tools/widl/header.h
index 63c732f..e905ae4 100644
--- a/tools/widl/header.h
+++ b/tools/widl/header.h
@@ -28,9 +28,9 @@
 extern void write_name(FILE *h, const var_t *v);
 extern const char* get_name(const var_t *v);
 extern void write_type(FILE *h, type_t *t, const var_t *v, const char *n);
-extern int is_object(attr_t *a);
-extern int is_local(attr_t *a);
-extern const var_t *is_callas(attr_t *a);
+extern int is_object(const attr_t *a);
+extern int is_local(const attr_t *a);
+extern const var_t *is_callas(const attr_t *a);
 extern void write_args(FILE *h, var_t *arg, const char *name, int obj, int do_indent);
 extern void write_array(FILE *h, const expr_t *v, int field);
 extern void write_forward(type_t *iface);
@@ -41,7 +41,7 @@
 extern void write_expr(FILE *h, const expr_t *e, int brackets);
 extern void write_constdef(const var_t *v);
 extern void write_externdef(const var_t *v);
-extern void write_library(const char *name, attr_t *attr);
+extern void write_library(const char *name, const attr_t *attr);
 extern void write_user_types(void);
 extern const var_t* get_explicit_handle_var(const func_t* func);
 
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index ca890f4..5b24eef 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -623,11 +623,12 @@
 	|      tDISPINTERFACE aKNOWNTYPE	{ $$ = get_type(0, $2, 0); }
 	;
 
-dispinterfacehdr: attributes dispinterface	{ $$ = $2;
+dispinterfacehdr: attributes dispinterface	{ attr_t *attrs;
+						  $$ = $2;
 						  if ($$->defined) yyerror("multiple definition error\n");
-						  $$->attrs = $1;
-						  $$->attrs = make_attr(ATTR_DISPINTERFACE);
-						  LINK($$->attrs, $1);
+						  attrs = make_attr(ATTR_DISPINTERFACE);
+						  LINK(attrs, $1);
+						  $$->attrs = attrs;
 						  $$->ref = find_type("IDispatch", 0);
 						  if (!$$->ref) yyerror("IDispatch is undefined\n");
 						  $$->defined = TRUE;
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index c578da7..6af89ad 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -183,7 +183,7 @@
   char *name;
   unsigned char type;
   struct _type_t *ref;
-  attr_t *attrs;
+  const attr_t *attrs;
   func_t *funcs;
   var_t *fields;
   int ignore, is_const, sign;