Module: wine Branch: refs/heads/master Commit: c08e00a9ecbecbe3339e7243ed51e42f96b5024a URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c08e00a9ecbecbe3339e7243...
Author: Robert Shearman rob@codeweavers.com Date: Tue Jan 31 18:05:43 2006 +0100
widl: Implement constant conformance.
---
tools/widl/typegen.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index f03cef3..2f7824a 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -296,6 +296,21 @@ static size_t write_conf_or_var_desc(FIL
if (!file) return 4; /* optimisation for sizing pass */
+ if (expr->is_const) + { + if (expr->cval > UCHAR_MAX * (USHRT_MAX + 1) + USHRT_MAX) + error("write_conf_or_var_desc: constant value %ld is greater than " + "the maximum constant size of %d\n", expr->cval, + UCHAR_MAX * (USHRT_MAX + 1) + USHRT_MAX); + + print_file(file, 2, "0x%x, /* Corr desc: constant, val = %ld */\n", + RPC_FC_CONSTANT_CONFORMANCE, expr->cval); + print_file(file, 2, "0x%x,\n", expr->cval & ~USHRT_MAX); + print_file(file, 2, "NdrShort(0x%x),\n", expr->cval & USHRT_MAX); + + return 4; + } + switch (subexpr->type) { case EXPR_PPTR: @@ -466,7 +481,7 @@ static size_t write_conf_or_var_desc(FIL } else { - error("write_conf_or_var_desc: expression type %d\n", subexpr->type); + error("write_conf_or_var_desc: top-level callback conformance unimplemented\n"); correlation_type = RPC_FC_TOP_LEVEL_CONFORMANCE; }