widl: duplicate type in case of argument with range attribute
Jérôme Gardou
jerome.gardou at laposte.net
Sun Aug 28 09:22:06 CDT 2011
---
tools/widl/parser.y | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 5286977..be22df2 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1418,6 +1418,11 @@ static var_t *declare_var(attr_list_t *attrs,
decl_spec_t *decl_spec, const decl
type_t *func_type = decl ? decl->func_type : NULL;
type_t *type = decl_spec->type;
+ /* In case of a range attribute, duplicate the type to keep track of
+ * the min/max values in the type format string */
+ if(is_attr(attrs, ATTR_RANGE))
+ type = duptype(type, 1);
+
if (is_attr(type->attrs, ATTR_INLINE))
{
if (!func_type)
--
1.7.2.5
More information about the wine-patches
mailing list