Am Samstag, den 10.01.2009, 22:32 +0000 schrieb Rob Shearman: > 2009/1/10 Michael Karcher <w...@mkarcher.dialup.fu-berlin.de>: > > get_deref_type yields the type of array elements for arrays or the > > pointed-to type of pointers. Most important, it works on anything > > is_declptr returns true for. > I don't believe that this type of helper function improves the > readability of the code, given that it only replaces two or three > lines of code and is only used in three places.
It's even only used in two places in this patch, but [5/8] adds another use and [6/8] adds two more uses of the helper function. Of course I can spell it out everywhere. But I suspect there might be further code fragments in widl that currently work only for plain pointers that should work for all types is_declpointer returns true for (being "plain pointers" and "[size_as] pointers" that are represented in widl as conformant arrays with declarray==FALSE). If you prefer, I can remove that function nevertheless. I introduced it, when I was annoyed that I can say "is_declptr(type)" but can't dereference it generically. Regards, Michael Karcher