Rob Shearman : widl: Pass current_structure into write_conf_or_var_desc in write_ip_tfs.
Alexandre Julliard
julliard at winehq.org
Tue Mar 16 11:49:14 CDT 2010
Module: wine
Branch: master
Commit: 5b533c1845d5e1acc12de40ecce006325d9c19f4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b533c1845d5e1acc12de40ecce006325d9c19f4
Author: Rob Shearman <robertshearman at gmail.com>
Date: Mon Mar 15 19:30:20 2010 +0000
widl: Pass current_structure into write_conf_or_var_desc in write_ip_tfs.
This allows write_conf_or_var_desc to have the context enabling it to
write out an appropriate correlation descriptor when iid_is is used
from within a structure.
---
tools/widl/typegen.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 4f56bda..7e7a851 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1090,6 +1090,13 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *structure,
else
param_type = RPC_FC_SHORT;
}
+ else if (type_get_type(correlation_variable) == TYPE_POINTER)
+ {
+ if (pointer_size == 8)
+ param_type = RPC_FC_HYPER;
+ else
+ param_type = RPC_FC_LONG;
+ }
else
{
error("write_conf_or_var_desc: non-arithmetic type used as correlation variable %s\n",
@@ -2647,12 +2654,14 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t
unsigned int start_offset = *typeformat_offset;
expr_t *iid = get_attrp(attrs, ATTR_IIDIS);
+ print_start_tfs_comment(file, type, start_offset);
+
if (iid)
{
print_file(file, 2, "0x2f, /* FC_IP */\n");
print_file(file, 2, "0x5c, /* FC_PAD */\n");
*typeformat_offset
- += write_conf_or_var_desc(file, NULL, 0, type, iid) + 2;
+ += write_conf_or_var_desc(file, current_structure, 0, type, iid) + 2;
}
else
{
@@ -2663,7 +2672,6 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t
error("%s: interface %s missing UUID\n", __FUNCTION__, base->name);
update_tfsoff(type, start_offset, file);
- print_start_tfs_comment(file, type, start_offset);
print_file(file, 2, "0x2f,\t/* FC_IP */\n");
print_file(file, 2, "0x5a,\t/* FC_CONSTANT_IID */\n");
print_file(file, 2, "NdrFcLong(0x%08x),\n", uuid->Data1);
More information about the wine-cvs
mailing list