From: Hans Leidekker hans@codeweavers.com
--- tools/widl/parser.y | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 7a79f4cb9b8..e2b8014aaa6 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2655,6 +2655,24 @@ static void check_propget_args(const var_t *func) } }
+static void check_propput_args(const var_t *func) +{ + const var_t *arg; + const var_list_t *arg_list = type_function_get_args(func->declspec.type); + unsigned int count = 0; + + if (!is_attr(func->attrs, ATTR_PROPPUT)) return; + + LIST_FOR_EACH_ENTRY(arg, arg_list, const var_t, entry) + { + count++; + if (count > 1) error_at( &arg->where, "propput function '%s' has too many parameters\n", func->name ); + + if (is_attr(arg->attrs, ATTR_OUT)) + error_at( &arg->where, "parameter '%s' of function '%s' must be an IN parameter\n", arg->name, func->name ); + } +} + /* checks that arguments for a function make sense for marshalling and unmarshalling */ static void check_remoting_args(const var_t *func) { @@ -2667,6 +2685,7 @@ static void check_remoting_args(const var_t *func) if (winrt_mode) { check_propget_args(func); + check_propput_args(func); check_eventadd_args(func); check_eventremove_args(func); }