widl: Handle the size_is attribute on pointers

Dan Hipschman dsh at linux.ucla.edu
Wed Aug 29 18:27:20 CDT 2007


This patch allows widl to handle pointers with the size_is and length_is
attributes on them.  MIDL just ignores these attributes on pointers, so
this is not really hard to get working.  It still does not handle the
case where a parameter is declared with "[]" syntax instead of "*"
syntax, which MIDL treats identically in some cases, but not others
(blech), but getting it to work for pointers at least allows us to
generate a typelib for a slightly modified version of bits.idl (the
modifications needed are to remove the async_uuid and lcid attributes).
The typelibs generated for simple cases such as "[size_is (1)] int *x"
and "[size_is (1), length_is (1)] int *x" by widl are identical to one
generated by MIDL.

---
 tools/widl/typelib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index 0238dc2..23238cf 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -206,6 +206,8 @@ unsigned short get_type_vt(type_t *t)
   case RPC_FC_UP:
   case RPC_FC_OP:
   case RPC_FC_FP:
+  case RPC_FC_CARRAY:
+  case RPC_FC_CVARRAY:
     if(t->ref)
     {
       if (match(t->ref->name, "SAFEARRAY"))



More information about the wine-patches mailing list