Module: wine Branch: master Commit: 56e65b453456ef49595e4194b1313753d9b7e5ce URL: http://source.winehq.org/git/wine.git/?a=commit;h=56e65b453456ef49595e4194b1...
Author: Alexandre Julliard julliard@winehq.org Date: Wed May 25 19:34:26 2011 +0200
widl: Allow using fixed size arrays as strings.
---
tools/widl/parser.y | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 3850e65..fc1076f 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2560,11 +2560,14 @@ static void check_remoting_args(const var_t *func) error_loc_info(&arg->loc_info, "out interface pointer '%s' of function '%s' is not a double pointer\n", arg->name, funcname); break; case TGT_STRING: - if (is_ptr(type) || - (is_array(type) && - (!type_array_has_conformance(type) || - type_array_get_conformance(type)->type == EXPR_VOID))) - error_loc_info(&arg->loc_info, "out parameter '%s' of function '%s' cannot be an unsized string\n", arg->name, funcname); + if (is_array(type)) + { + /* needs conformance or fixed dimension */ + if (type_array_has_conformance(type) && + type_array_get_conformance(type)->type != EXPR_VOID) break; + if (!type_array_has_conformance(type) && type_array_get_dim(type)) break; + } + error_loc_info(&arg->loc_info, "out parameter '%s' of function '%s' cannot be an unsized string\n", arg->name, funcname); break; case TGT_INVALID: /* already error'd before we get here */