Jacek Caban : widl: Don't allow coclass declaration in winrt mode.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Aug 7 10:57:43 CDT 2015
Module: wine
Branch: master
Commit: a99bb3468a8efc853b4282a30ce2eb45462afe7f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a99bb3468a8efc853b4282a30ce2eb45462afe7f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Aug 7 15:41:32 2015 +0200
widl: Don't allow coclass declaration in winrt mode.
---
tools/widl/parser.y | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index b9234a4..0a149b0 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -2714,10 +2714,26 @@ static void check_statements(const statement_list_t *stmts, int is_inside_librar
if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
{
- if (stmt->type == STMT_LIBRARY)
- check_statements(stmt->u.lib->stmts, TRUE);
- else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
- check_functions(stmt->u.type, is_inside_library);
+ switch(stmt->type) {
+ case STMT_LIBRARY:
+ check_statements(stmt->u.lib->stmts, TRUE);
+ break;
+ case STMT_TYPE:
+ switch(type_get_type(stmt->u.type)) {
+ case TYPE_INTERFACE:
+ check_functions(stmt->u.type, is_inside_library);
+ break;
+ case TYPE_COCLASS:
+ if(winrt_mode)
+ error_loc("coclass is not allowed in Windows Runtime mode\n");
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
}
}
More information about the wine-cvs
mailing list