[5/5] widl: Remove var_t's ptr_level field and start write_pointers
Dan Hipschman
dsh at linux.ucla.edu
Thu May 10 00:57:01 CDT 2007
Well, I sent this quite a while ago and it hasn't shown up on the list yet.
It's probably too big, so here's a link to the patch instead of inlining it.
This patch finally takes the ptr_level field out of the var_t struct. This
field was always a bad idea, conceptually because pointer info belongs in
the type_t structure, and in practice because none of the ptr_level code
generalizes to typedef'd types. It also made dealing with pointers a major
headache since there was always two ways to repesent pointers, and you always
had to think about both of them.
This also begins an implementation of write_pointers, which generates the
type format string for pointers in structures and arrays. It's the first
error encountered when compiling oaidl.idl. The reason I put both of these
in a single patch is that when I originally took out ptr_level, a lot of
stuff was still broken, and I didn't realize it until I started writing
write_pointers. I had to go back and tweak the ptr_level patch, and now
it's a bit of a chore to separate them again, whereas this patch is already
tested and working. It also includes new tests which pass on wine and XP.
---
dlls/rpcrt4/tests/server.c | 40 ++++
dlls/rpcrt4/tests/server.idl | 18 ++
tools/widl/client.c | 12 +-
tools/widl/header.c | 81 ++++----
tools/widl/header.h | 22 ++-
tools/widl/parser.y | 126 +++++++----
tools/widl/proxy.c | 17 +-
tools/widl/server.c | 4 +-
tools/widl/typegen.c | 534 ++++++++++++++++++++++--------------------
tools/widl/typegen.h | 2 +-
tools/widl/widltypes.h | 12 +-
tools/widl/write_msft.c | 30 ++--
12 files changed, 521 insertions(+), 377 deletions(-)
Link to the patch:
http://linux.ucla.edu/~dsh/patches/widl_pointers_070509_6_0005.diff
More information about the wine-patches
mailing list