Hello.
Maybe the comment isn't clear enough.
The ranges are correctly output into the format string, but the offset of each output is lost during the processing. For instance, declaring a function like this one :
DWORD Test( [in, range(0, 1024)] DWORD dwParam1, [in, range(0, 255)] DWORD dwParam2);
would output both parameter declarations into the type format string with correct range values, but the offsets into the procedure format string would both point to the last one. I'll try to write a test to show this behaviour, but I'm not sure of how to integrate this in wine test suite.
Note : this problem manifests itself when -Oif flag is enabled.
Regards. Jérôme.
Le 30/08/2011 12:46, Alexandre Julliard a écrit :
Jérôme Gardoujerome.gardou@laposte.net writes:
@@ -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);
You shouldn't need that. The range should go with the variable and be output again for each type. Please add a test case showing the problem.