widl [2/6]: Handle more pointer types in write_type

Dan Hipschman dsh at linux.ucla.edu
Tue Aug 29 13:14:05 CDT 2006


On Tue, Aug 29, 2006 at 01:54:23PM +0100, Robert Shearman wrote:
> I see from a couple of patches back that you intend to move the 
> representation of pointers out of the var_t type. How do you intend to 
> represent "char **" for example?
> type: FC_RP, ref: { type: FC_RP, ref: { type: FC_CHAR } }
> or:
> type: FC_CHAR, ptr_level: 2
> 
> It seems to me you're going down the first route (and there's nothing 
> wrong with that as far as I can see). I'm just interested to know which 
> approach you are taking.

I think the first approach leads to more natural recursion, so that's what
I was shooting for.  It may take up more memory, but that's likely to be
insignificant.  There are three things I'd like to change with widl, just
so you know where I'm at: 1. Defining typedef'd types as those having the
type field equal zero and ref field non-null.  It leads to too much special
case handling.  That's what my last series of patches aims to solve.
2. Remove ptr_level from var_t and just have its type represent pointers.
This would, again, eliminate the need for some special case code and allow
types to be processed in a more natural, recursive (or iterative) way.
3. Remove tname from var_t.  If a type has a name, why not just attach it
to the type instead of the variable.  I haven't looked into this in any
depth, so I may be missing the need for it, now.

I wanted to solve the first problem because it was hindering the work I was
doing getting widl to generate a proxy file for oaidl.  The other two I was
going to hold off doing anything about until I had completed the work on the
proxy code (unless they turned out to be necessary for that).  I don't want
to spend all my time making design changes.  It's subjective and it's more
important to fix actual bugs, which is what I'd like to be doing.



More information about the wine-devel mailing list