[PATCH 1/4] widl: Keep const attributes applied to pointers when writing out the type.

Alexandre Julliard julliard at winehq.org
Tue Apr 29 06:45:11 CDT 2008


Robert Shearman <rob at codeweavers.com> writes:

> Use an attribute to store the const qualifier for the pointer and type.
>
> Allow multiple type-qualifiers to be applied to a type by adding a
> declaration-specifier rule that encompasses type-qualifiers and types.
> ---
>  tools/widl/header.c    |    5 ++-
>  tools/widl/parser.y    |  103
> ++++++++++++++++++++++++++++++++++++++++-------
>  tools/widl/widltypes.h |    2 +-
>  3 files changed, 92 insertions(+), 18 deletions(-)
>
> This is a resend of a previous patch, with the bug that Alexandre
> spotted fixed. The bug was that typedef'd types and arrays would no
> longer have any const modifier applied to them.

That works now, though there is still something not quite right:

--- include/d3d10.h.old	2008-04-29 13:38:38.000000000 +0200
+++ include/d3d10.h	2008-04-29 13:39:08.000000000 +0200
@@ -3455,12 +3455,12 @@
     virtual void STDMETHODCALLTYPE VSSetConstantBuffers(
         UINT StartSlot,
         UINT NumBuffers,
-        ID3D10Buffer **ppConstantBuffers) = 0;
+        ID3D10Buffer **const ppConstantBuffers) = 0;
 
It should be "ID3D10Buffer * const *" instead.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list