Rob Shearman : widl: Fix the types of enums with the v1_enum attribute applied.
Alexandre Julliard
julliard at winehq.org
Tue Jun 24 06:44:30 CDT 2008
Module: wine
Branch: master
Commit: 4997f1849b0716cbf2db1b646886162f5ae014c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4997f1849b0716cbf2db1b646886162f5ae014c1
Author: Rob Shearman <robertshearman at gmail.com>
Date: Mon Jun 23 22:29:03 2008 +0100
widl: Fix the types of enums with the v1_enum attribute applied.
---
tools/widl/parser.y | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 3248bf8..4db992b 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1479,6 +1479,14 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl,
error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n",
v->name);
+ if (is_attr(v->attrs, ATTR_V1ENUM))
+ {
+ if (v->type->type == RPC_FC_ENUM16)
+ v->type->type = RPC_FC_ENUM32;
+ else
+ error_loc("'%s': [v1_enum] attribute applied to non-enum type\n", v->name);
+ }
+
sizeless = FALSE;
if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry)
{
More information about the wine-cvs
mailing list